MCPcopy
hub / github.com/fastapi/fastapi / test_strings_in_custom_swagger

Function test_strings_in_custom_swagger

tests/test_local_docs.py:18–32  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

16
17
18def test_strings_in_custom_swagger():
19 swagger_js_url = "swagger_fake_file.js"
20 swagger_css_url = "swagger_fake_file.css"
21 swagger_favicon_url = "swagger_fake_file.png"
22 html = get_swagger_ui_html(
23 openapi_url="/docs",
24 title="title",
25 swagger_js_url=swagger_js_url,
26 swagger_css_url=swagger_css_url,
27 swagger_favicon_url=swagger_favicon_url,
28 )
29 body_content = bytes(html.body).decode()
30 assert swagger_js_url in body_content
31 assert swagger_css_url in body_content
32 assert swagger_favicon_url in body_content
33
34
35def test_strings_in_generated_redoc():

Callers

nothing calls this directly

Calls 1

get_swagger_ui_htmlFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…