Home / Function/ test_swagger_ui() — fastapi Function Reference

test_swagger_ui() — fastapi Function Reference

Architecture documentation for the test_swagger_ui() function in test_tutorial003.py from the fastapi codebase.

Entity Profile

Dependency Diagram

graph TD
  b393e31a_0235_b7b7_bbe7_d1be6d2d39d9["test_swagger_ui()"]
  4c57de0e_a031_a9a6_d833_a896fed389b0["test_tutorial003.py"]
  b393e31a_0235_b7b7_bbe7_d1be6d2d39d9 -->|defined in| 4c57de0e_a031_a9a6_d833_a896fed389b0
  style b393e31a_0235_b7b7_bbe7_d1be6d2d39d9 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

tests/test_tutorial/test_configure_swagger_ui/test_tutorial003.py lines 8–38

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"
    )

Domain

Subdomains

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_tutorial003.py.
Where is test_swagger_ui() defined?
test_swagger_ui() is defined in tests/test_tutorial/test_configure_swagger_ui/test_tutorial003.py at line 8.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free