- Sort Score
- Num 10 results
- Language All
Results 1 - 1 of 1 for test_read_users (0.44 seconds)
-
tests/test_param_in_path_and_dependency.py
async def user_exists(user_id: int): return True @app.get("/users/{user_id}", dependencies=[Depends(user_exists)]) async def read_users(user_id: int): pass client = TestClient(app) def test_read_users(): response = client.get("/users/42") assert response.status_code == 200, response.text def test_openapi_schema(): response = client.get("/openapi.json") assert response.json() == snapshot(
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Sun Feb 08 10:18:38 GMT 2026 - 3.6K bytes - Click Count (0)