- Sort Score
- Num 10 results
- Language All
Results 1 - 4 of 4 for test_swagger_ui (0.1 seconds)
-
tests/test_custom_swagger_ui_redirect.py
app = FastAPI(swagger_ui_oauth2_redirect_url=swagger_ui_oauth2_redirect_url) @app.get("/items/") async def read_items(): return {"id": "foo"} client = TestClient(app) 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
Created: 2026-04-05 07:19 - Last Modified: 2020-04-08 04:37 - 1.1K bytes - Click Count (0) -
tests/test_swagger_ui_init_oauth.py
app = FastAPI(swagger_ui_init_oauth=swagger_ui_init_oauth) @app.get("/items/") async def read_items(): return {"id": "foo"} client = TestClient(app) def test_swagger_ui(): response = client.get("/docs") assert response.status_code == 200, response.text print(response.text) assert "ui.initOAuth" in response.text assert '"appName": "The Predendapp"' in response.text
Created: 2026-04-05 07:19 - Last Modified: 2020-08-09 10:54 - 718 bytes - Click Count (0) -
tests/test_application.py
], ) def test_get_path(path, expected_status, expected_response): response = client.get(path) assert response.status_code == expected_status assert response.json() == expected_response 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
Created: 2026-04-05 07:19 - Last Modified: 2026-02-08 10:18 - 56.9K bytes - Click Count (0) -
tests/test_no_swagger_ui_redirect.py
from fastapi.testclient import TestClient app = FastAPI(swagger_ui_oauth2_redirect_url=None) @app.get("/items/") async def read_items(): return {"id": "foo"} client = TestClient(app) 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
Created: 2026-04-05 07:19 - Last Modified: 2020-04-08 04:37 - 786 bytes - Click Count (0)