- Sort Score
- Result 10 results
- Languages All
Results 111 - 120 of 1,107 for asset1 (0.07 sec)
-
tests/test_tutorial/test_request_form_models/test_tutorial002_an.py
assert response.status_code == 200 assert response.json() == {"username": "Foo", "password": "secret"} @needs_pydanticv2 def test_post_body_extra_form(client: TestClient): response = client.post( "/login/", data={"username": "Foo", "password": "secret", "extra": "extra"} ) assert response.status_code == 422 assert response.json() == { "detail": [
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Sep 06 17:31:18 UTC 2024 - 6.2K bytes - Viewed (0) -
tests/test_tutorial/test_request_form_models/test_tutorial002_pv1.py
assert response.status_code == 200 assert response.json() == {"username": "Foo", "password": "secret"} @needs_pydanticv1 def test_post_body_extra_form(client: TestClient): response = client.post( "/login/", data={"username": "Foo", "password": "secret", "extra": "extra"} ) assert response.status_code == 422 assert response.json() == { "detail": [
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Sep 06 17:31:18 UTC 2024 - 6K bytes - Viewed (0) -
tests/test_tutorial/test_dependencies/test_tutorial008c_an.py
def test_get_no_item(client: TestClient): response = client.get("/items/foo") assert response.status_code == 404, response.text assert response.json() == {"detail": "Item not found, there's only a plumbus here"} def test_get(client: TestClient): response = client.get("/items/plumbus") assert response.status_code == 200, response.text assert response.json() == "plumbus" def test_fastapi_error(client: TestClient):
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Feb 24 23:06:37 UTC 2024 - 1.1K bytes - Viewed (0) -
tests/test_tutorial/test_header_param_models/test_tutorial001.py
assert response.status_code == 200 assert response.json() == { "host": "testserver", "save_data": True, "if_modified_since": None, "traceparent": None, "x_tag": [], } def test_header_param_model_invalid(client: TestClient): response = client.get("/items/") assert response.status_code == 422
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Tue Sep 17 18:54:10 UTC 2024 - 8.7K bytes - Viewed (0) -
tests/test_tutorial/test_body_multiple_params/test_tutorial001_an_py39.py
response = client.put("/items/5?q=bar", json=None) assert response.status_code == 200 assert response.json() == {"item_id": 5, "q": "bar"} @needs_py39 def test_post_no_body(client: TestClient): response = client.put("/items/5", json=None) assert response.status_code == 200 assert response.json() == {"item_id": 5} @needs_py39 def test_post_id_foo(client: TestClient):
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_dependencies/test_tutorial008d.py
def test_get_no_item(client: TestClient): response = client.get("/items/foo") assert response.status_code == 404, response.text assert response.json() == {"detail": "Item not found, there's only a plumbus here"} def test_get(client: TestClient): response = client.get("/items/plumbus") assert response.status_code == 200, response.text assert response.json() == "plumbus" def test_internal_error(client: TestClient):
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Feb 24 23:06:37 UTC 2024 - 1.2K bytes - Viewed (0) -
tests/test_tutorial/test_dependencies/test_tutorial008b.py
client = TestClient(app) def test_get_no_item(): response = client.get("/items/foo") assert response.status_code == 404, response.text assert response.json() == {"detail": "Item not found"} def test_owner_error(): response = client.get("/items/plumbus") assert response.status_code == 400, response.text assert response.json() == {"detail": "Owner error: Rick"} def test_get_item():
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Tue Dec 26 20:37:34 UTC 2023 - 697 bytes - Viewed (0) -
tests/test_dependency_duplicates.py
json={"item": {"data": "myitem"}, "item2": {"data": "myitem2"}}, ) assert response.status_code == 200, response.text assert response.json() == [{"data": "myitem"}, {"data": "myitem2"}] def test_duplicates(): response = client.post("/with-duplicates", json={"data": "myitem"}) assert response.status_code == 200, response.text assert response.json() == [{"data": "myitem"}, {"data": "myitem"}]
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Apr 18 19:40:57 UTC 2024 - 8.4K bytes - Viewed (0) -
tests/test_tutorial/test_security/test_tutorial001_an_py39.py
assert response.status_code == 401, response.text assert response.json() == {"detail": "Not authenticated"} assert response.headers["WWW-Authenticate"] == "Bearer" @needs_py39 def test_openapi_schema(client: TestClient): response = client.get("/openapi.json") assert response.status_code == 200, response.text assert response.json() == { "openapi": "3.1.0",
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jun 30 18:25:16 UTC 2023 - 2.1K bytes - Viewed (0) -
tests/test_tutorial/test_request_form_models/test_tutorial002_pv1_an_p39.py
@needs_pydanticv1 @needs_py39 def test_post_body_form(client: TestClient): response = client.post("/login/", data={"username": "Foo", "password": "secret"}) assert response.status_code == 200 assert response.json() == {"username": "Foo", "password": "secret"} # TODO: remove when deprecating Pydantic v1 @needs_pydanticv1 @needs_py39 def test_post_body_extra_form(client: TestClient):
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Sep 06 17:31:18 UTC 2024 - 6.5K bytes - Viewed (0)