test_default_openapi() — fastapi Function Reference
Architecture documentation for the test_default_openapi() function in test_tutorial001.py from the fastapi codebase.
Entity Profile
Dependency Diagram
graph TD 8c1bf58e_1745_bb4b_9f29_31b1fdf5ae14["test_default_openapi()"] 306174d9_aa86_c300_fab5_8e766f077ecb["test_tutorial001.py"] 8c1bf58e_1745_bb4b_9f29_31b1fdf5ae14 -->|defined in| 306174d9_aa86_c300_fab5_8e766f077ecb e696bba6_81f5_aac6_e4ec_43e97d5c128e["get_client()"] 8c1bf58e_1745_bb4b_9f29_31b1fdf5ae14 -->|calls| e696bba6_81f5_aac6_e4ec_43e97d5c128e style 8c1bf58e_1745_bb4b_9f29_31b1fdf5ae14 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
tests/test_tutorial/test_conditional_openapi/test_tutorial001.py lines 35–61
def test_default_openapi():
client = get_client()
response = client.get("/docs")
assert response.status_code == 200, response.text
response = client.get("/redoc")
assert response.status_code == 200, response.text
response = client.get("/openapi.json")
assert response.json() == snapshot(
{
"openapi": "3.1.0",
"info": {"title": "FastAPI", "version": "0.1.0"},
"paths": {
"/": {
"get": {
"summary": "Root",
"operationId": "root__get",
"responses": {
"200": {
"description": "Successful Response",
"content": {"application/json": {"schema": {}}},
}
},
}
}
},
}
)
Domain
Subdomains
Calls
Source
Frequently Asked Questions
What does test_default_openapi() do?
test_default_openapi() is a function in the fastapi codebase, defined in tests/test_tutorial/test_conditional_openapi/test_tutorial001.py.
Where is test_default_openapi() defined?
test_default_openapi() is defined in tests/test_tutorial/test_conditional_openapi/test_tutorial001.py at line 35.
What does test_default_openapi() call?
test_default_openapi() calls 1 function(s): get_client.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free