Home / Function/ test_swagger_ui() — fastapi Function Reference

test_swagger_ui() — fastapi Function Reference

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

Entity Profile

Dependency Diagram

graph TD
  edb30ce4_9d31_18fe_d368_a821d3939b3f["test_swagger_ui()"]
  c7f398ca_88a4_824a_0de6_f116e3d85e08["test_custom_swagger_ui_redirect.py"]
  edb30ce4_9d31_18fe_d368_a821d3939b3f -->|defined in| c7f398ca_88a4_824a_0de6_f116e3d85e08
  style edb30ce4_9d31_18fe_d368_a821d3939b3f fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

tests/test_custom_swagger_ui_redirect.py lines 17–26

def test_swagger_ui():
    response = client.get("/docs")
    assert response.status_code == 200, response.text
    assert response.headers["content-type"] == "text/html; charset=utf-8"
    assert "swagger-ui-dist" in response.text
    print(client.base_url)
    assert (
        f"oauth2RedirectUrl: window.location.origin + '{swagger_ui_oauth2_redirect_url}'"
        in response.text
    )

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_custom_swagger_ui_redirect.py.
Where is test_swagger_ui() defined?
test_swagger_ui() is defined in tests/test_custom_swagger_ui_redirect.py at line 17.

Analyze Your Own Codebase

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

Try Supermodel Free