test_swagger_ui() — fastapi Function Reference
Architecture documentation for the test_swagger_ui() function in test_tutorial002.py from the fastapi codebase.
Entity Profile
Dependency Diagram
graph TD 0a7af7cf_0058_2267_529c_e5d57a480a27["test_swagger_ui()"] 5d852ae7_2bbf_f564_8461_b2499ef2eb5c["test_tutorial002.py"] 0a7af7cf_0058_2267_529c_e5d57a480a27 -->|defined in| 5d852ae7_2bbf_f564_8461_b2499ef2eb5c style 0a7af7cf_0058_2267_529c_e5d57a480a27 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
tests/test_tutorial/test_configure_swagger_ui/test_tutorial002.py lines 8–38
def test_swagger_ui():
response = client.get("/docs")
assert response.status_code == 200, response.text
assert '"syntaxHighlight": false' not in response.text, (
"not used parameters should not be included"
)
assert '"syntaxHighlight": {"theme": "obsidian"}' in response.text, (
"parameters with middle dots should be included in a JSON compatible way"
)
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 '"deepLinking": true,' 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"
)
Domain
Subdomains
Source
Frequently Asked Questions
What does test_swagger_ui() do?
test_swagger_ui() is a function in the fastapi codebase, defined in tests/test_tutorial/test_configure_swagger_ui/test_tutorial002.py.
Where is test_swagger_ui() defined?
test_swagger_ui() is defined in tests/test_tutorial/test_configure_swagger_ui/test_tutorial002.py at line 8.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free