()
| 4 | |
| 5 | |
| 6 | def test_strings_in_generated_swagger(): |
| 7 | sig = inspect.signature(get_swagger_ui_html) |
| 8 | swagger_js_url = sig.parameters.get("swagger_js_url").default # type: ignore |
| 9 | swagger_css_url = sig.parameters.get("swagger_css_url").default # type: ignore |
| 10 | swagger_favicon_url = sig.parameters.get("swagger_favicon_url").default # type: ignore |
| 11 | html = get_swagger_ui_html(openapi_url="/docs", title="title") |
| 12 | body_content = bytes(html.body).decode() |
| 13 | assert swagger_js_url in body_content |
| 14 | assert swagger_css_url in body_content |
| 15 | assert swagger_favicon_url in body_content |
| 16 | |
| 17 | |
| 18 | def test_strings_in_custom_swagger(): |
nothing calls this directly
no test coverage detected
searching dependent graphs…