- Sort Score
- Result 10 results
- Languages All
Results 281 - 290 of 1,107 for asset1 (0.12 sec)
-
tests/test_enforce_once_required_parameter.py
} } }, } def test_schema(): response = client.get("/openapi.json") assert response.status_code == status.HTTP_200_OK actual_schema = response.json() assert actual_schema == expected_schema def test_get_invalid(): response = client.get("/foo") assert response.status_code == status.HTTP_422_UNPROCESSABLE_ENTITY def test_get_valid():
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jun 30 18:25:16 UTC 2023 - 3.4K bytes - Viewed (0) -
tests/test_annotated.py
response = client.get("/test1") assert response.status_code == 200 assert response.json() == {"foo": "bar"} response = client.get("/test1", params={"var": "baz"}) assert response.status_code == 200 assert response.json() == {"foo": "baz"} response = client.get("/test2") assert response.status_code == 200 assert response.json() == {"foo": "bar"}
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Apr 18 19:40:57 UTC 2024 - 10.2K bytes - Viewed (0) -
tests/test_tutorial/test_request_form_models/test_tutorial001.py
response = client.post("/login/", data={"username": "Foo", "password": "secret"}) assert response.status_code == 200 assert response.json() == {"username": "Foo", "password": "secret"} def test_post_body_form_no_password(client: TestClient): response = client.post("/login/", data={"username": "Foo"}) assert response.status_code == 422 assert response.json() == IsDict( { "detail": [ {
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Sep 05 15:16:50 UTC 2024 - 7.4K bytes - Viewed (0) -
tests/test_tutorial/test_request_forms/test_tutorial001.py
response = client.post("/login/", data={"username": "Foo", "password": "secret"}) assert response.status_code == 200 assert response.json() == {"username": "Foo"} def test_post_body_form_no_password(client: TestClient): response = client.post("/login/", data={"username": "Foo"}) assert response.status_code == 422 assert response.json() == IsDict( { "detail": [ {
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Apr 18 19:40:57 UTC 2024 - 7.5K bytes - Viewed (0) -
tests/test_tutorial/test_request_forms/test_tutorial001_an.py
response = client.post("/login/", data={"username": "Foo", "password": "secret"}) assert response.status_code == 200 assert response.json() == {"username": "Foo"} def test_post_body_form_no_password(client: TestClient): response = client.post("/login/", data={"username": "Foo"}) assert response.status_code == 422 assert response.json() == IsDict( { "detail": [ {
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Apr 18 19:40:57 UTC 2024 - 7.5K bytes - Viewed (0) -
tests/test_tutorial/test_request_forms/test_tutorial001_an_py39.py
response = client.post("/login/", data={"username": "Foo", "password": "secret"}) assert response.status_code == 200 assert response.json() == {"username": "Foo"} @needs_py39 def test_post_body_form_no_password(client: TestClient): response = client.post("/login/", data={"username": "Foo"}) assert response.status_code == 422 assert response.json() == IsDict( { "detail": [ {
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Apr 18 19:40:57 UTC 2024 - 7.6K bytes - Viewed (0) -
tests/test_tutorial/test_request_files/test_tutorial001_03_an.py
assert response.status_code == 200, response.text assert response.json() == {"file_size": 14} def test_post_upload_file(tmp_path): path = tmp_path / "test.txt" path.write_bytes(b"<file content>") client = TestClient(app) with path.open("rb") as file: response = client.post("/uploadfile/", files={"file": file}) assert response.status_code == 200, response.text
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jun 30 18:25:16 UTC 2023 - 6K bytes - Viewed (0) -
tests/test_tutorial/test_separate_openapi_schemas/test_tutorial002_py310.py
response = client.post("/items/", json={"name": "Foo"}) assert response.status_code == 200, response.text assert response.json() == {"name": "Foo", "description": None} @needs_py310 def test_read_items(client: TestClient) -> None: response = client.get("/items/") assert response.status_code == 200, response.text assert response.json() == [ { "name": "Portal Gun",
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Aug 25 19:10:22 UTC 2023 - 4.9K bytes - Viewed (0) -
tests/test_security_http_digest.py
response = client.get("/users/me", headers={"Authorization": "Digest foobar"}) assert response.status_code == 200, response.text assert response.json() == {"scheme": "Digest", "credentials": "foobar"} def test_security_http_digest_no_credentials(): response = client.get("/users/me") assert response.status_code == 403, response.text assert response.json() == {"detail": "Not authenticated"}
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jun 30 18:25:16 UTC 2023 - 2K bytes - Viewed (0) -
tests/test_security_oauth2_authorization_code_bearer.py
def test_no_token(): response = client.get("/items") assert response.status_code == 401, response.text assert response.json() == {"detail": "Not authenticated"} def test_incorrect_token(): response = client.get("/items", headers={"Authorization": "Non-existent testtoken"}) assert response.status_code == 401, response.text assert response.json() == {"detail": "Not authenticated"} def test_token():
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jun 30 18:25:16 UTC 2023 - 2.3K bytes - Viewed (0)