Home / Function/ test_strings_in_generated_swagger() — fastapi Function Reference

test_strings_in_generated_swagger() — fastapi Function Reference

Architecture documentation for the test_strings_in_generated_swagger() function in test_local_docs.py from the fastapi codebase.

Entity Profile

Dependency Diagram

graph TD
  d340379d_71d9_3564_53cd_32087c76ff09["test_strings_in_generated_swagger()"]
  62047866_e337_3c14_2193_c01cbd5b91aa["test_local_docs.py"]
  d340379d_71d9_3564_53cd_32087c76ff09 -->|defined in| 62047866_e337_3c14_2193_c01cbd5b91aa
  3705e434_dfc7_b070_aae6_93314a9b9976["get_swagger_ui_html()"]
  d340379d_71d9_3564_53cd_32087c76ff09 -->|calls| 3705e434_dfc7_b070_aae6_93314a9b9976
  style d340379d_71d9_3564_53cd_32087c76ff09 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

tests/test_local_docs.py lines 6–15

def test_strings_in_generated_swagger():
    sig = inspect.signature(get_swagger_ui_html)
    swagger_js_url = sig.parameters.get("swagger_js_url").default  # type: ignore
    swagger_css_url = sig.parameters.get("swagger_css_url").default  # type: ignore
    swagger_favicon_url = sig.parameters.get("swagger_favicon_url").default  # type: ignore
    html = get_swagger_ui_html(openapi_url="/docs", title="title")
    body_content = html.body.decode()
    assert swagger_js_url in body_content
    assert swagger_css_url in body_content
    assert swagger_favicon_url in body_content

Domain

Subdomains

Frequently Asked Questions

What does test_strings_in_generated_swagger() do?
test_strings_in_generated_swagger() is a function in the fastapi codebase, defined in tests/test_local_docs.py.
Where is test_strings_in_generated_swagger() defined?
test_strings_in_generated_swagger() is defined in tests/test_local_docs.py at line 6.
What does test_strings_in_generated_swagger() call?
test_strings_in_generated_swagger() calls 1 function(s): get_swagger_ui_html.

Analyze Your Own Codebase

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

Try Supermodel Free