- Sort Score
- Result 10 results
- Languages All
Results 11 - 15 of 15 for test_path_operation (0.06 sec)
-
tests/test_tutorial/test_additional_responses/test_tutorial001.py
from fastapi.testclient import TestClient from docs_src.additional_responses.tutorial001_py39 import app client = TestClient(app) def test_path_operation(): response = client.get("/items/foo") assert response.status_code == 200, response.text assert response.json() == {"id": "foo", "value": "there goes my hero"} def test_path_operation_not_found(): response = client.get("/items/bar")
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 4.3K bytes - Viewed (0) -
tests/test_tutorial/test_additional_responses/test_tutorial003.py
from fastapi.testclient import TestClient from docs_src.additional_responses.tutorial003_py39 import app client = TestClient(app) def test_path_operation(): response = client.get("/items/foo") assert response.status_code == 200, response.text assert response.json() == {"id": "foo", "value": "there goes my hero"} def test_path_operation_not_found(): response = client.get("/items/bar")
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 4.6K bytes - Viewed (0) -
tests/test_tutorial/test_response_directly/test_tutorial001.py
], ) def get_client(request: pytest.FixtureRequest): mod = importlib.import_module(f"docs_src.response_directly.{request.param}") client = TestClient(mod.app) return client def test_path_operation(client: TestClient): response = client.put( "/items/1", json={ "title": "Foo", "timestamp": "2023-01-01T12:00:00", "description": "A test item", },
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 20 15:55:38 UTC 2025 - 5.1K bytes - Viewed (0) -
tests/test_tutorial/test_metadata/test_tutorial004.py
from fastapi.testclient import TestClient from docs_src.metadata.tutorial004_py39 import app client = TestClient(app) def test_path_operations(): response = client.get("/items/") assert response.status_code == 200, response.text response = client.get("/users/") assert response.status_code == 200, response.text def test_openapi_schema(): response = client.get("/openapi.json")
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 2K bytes - Viewed (0) -
tests/test_response_model_sub_types.py
@app.get("/valid3", responses={"500": {"model": Model}}) def valid3(): pass @app.get("/valid4", responses={"500": {"model": list[Model]}}) def valid4(): pass client = TestClient(app) def test_path_operations(): response = client.get("/valid1") assert response.status_code == 200, response.text response = client.get("/valid2") assert response.status_code == 200, response.text
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 21:25:59 UTC 2025 - 5.2K bytes - Viewed (0)