Home / Function/ test_swagger_ui() — fastapi Function Reference

test_swagger_ui() — fastapi Function Reference

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

Entity Profile

Dependency Diagram

graph TD
  52796abd_70ef_31fd_8453_cb45fa62beb6["test_swagger_ui()"]
  8c69dd62_7e96_47cc_b631_577e4ecbb73d["test_no_swagger_ui_redirect.py"]
  52796abd_70ef_31fd_8453_cb45fa62beb6 -->|defined in| 8c69dd62_7e96_47cc_b631_577e4ecbb73d
  style 52796abd_70ef_31fd_8453_cb45fa62beb6 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

tests/test_no_swagger_ui_redirect.py lines 15–21

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 "oauth2RedirectUrl" not 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_no_swagger_ui_redirect.py.
Where is test_swagger_ui() defined?
test_swagger_ui() is defined in tests/test_no_swagger_ui_redirect.py at line 15.

Analyze Your Own Codebase

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

Try Supermodel Free