test_tutorial003.py — fastapi Source File
Architecture documentation for test_tutorial003.py, a python file in the fastapi codebase. 2 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR 4c57de0e_a031_a9a6_d833_a896fed389b0["test_tutorial003.py"] a7c04dee_ee23_5891_b185_47ff6bed036d["testclient.py"] 4c57de0e_a031_a9a6_d833_a896fed389b0 --> a7c04dee_ee23_5891_b185_47ff6bed036d 45ba7c66_d54f_e6c5_41f3_70c35dad341d["tutorial003_py39.py"] 4c57de0e_a031_a9a6_d833_a896fed389b0 --> 45ba7c66_d54f_e6c5_41f3_70c35dad341d style 4c57de0e_a031_a9a6_d833_a896fed389b0 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
from fastapi.testclient import TestClient
from docs_src.configure_swagger_ui.tutorial003_py39 import app
client = TestClient(app)
def test_swagger_ui():
response = client.get("/docs")
assert response.status_code == 200, response.text
assert '"deepLinking": false,' in response.text, (
"overridden configs should be preserved"
)
assert '"deepLinking": true' not in response.text, (
"overridden configs should not include the old value"
)
assert '"syntaxHighlight": false' not in response.text, (
"not used parameters should not be included"
)
assert '"dom_id": "#swagger-ui"' in response.text, (
"default configs should be preserved"
)
assert "presets: [" in response.text, "default configs should be preserved"
assert "SwaggerUIBundle.presets.apis," in response.text, (
"default configs should be preserved"
)
assert "SwaggerUIBundle.SwaggerUIStandalonePreset" in response.text, (
"default configs should be preserved"
)
assert '"layout": "BaseLayout",' in response.text, (
"default configs should be preserved"
)
assert '"showExtensions": true,' in response.text, (
"default configs should be preserved"
)
assert '"showCommonExtensions": true,' in response.text, (
"default configs should be preserved"
)
def test_get_users():
response = client.get("/users/foo")
assert response.status_code == 200, response.text
assert response.json() == {"message": "Hello foo"}
Domain
Subdomains
Functions
Dependencies
Source
Frequently Asked Questions
What does test_tutorial003.py do?
test_tutorial003.py is a source file in the fastapi codebase, written in python. It belongs to the FastAPI domain, Responses subdomain.
What functions are defined in test_tutorial003.py?
test_tutorial003.py defines 2 function(s): test_get_users, test_swagger_ui.
What does test_tutorial003.py depend on?
test_tutorial003.py imports 2 module(s): testclient.py, tutorial003_py39.py.
Where is test_tutorial003.py in the architecture?
test_tutorial003.py is located at tests/test_tutorial/test_configure_swagger_ui/test_tutorial003.py (domain: FastAPI, subdomain: Responses, directory: tests/test_tutorial/test_configure_swagger_ui).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free