(tmp_path: Path)
| 62 | |
| 63 | |
| 64 | def test_index_fallback_ignores_invalid_q_value(tmp_path: Path): |
| 65 | dist = tmp_path / "dist" |
| 66 | write_file(dist / "index.html", "app shell") |
| 67 | app = FastAPI() |
| 68 | app.frontend("/", directory=dist, fallback="index.html") |
| 69 | |
| 70 | response = TestClient(app).get( |
| 71 | "/dashboard/settings", headers={"accept": "text/html; q=wat"} |
| 72 | ) |
| 73 | |
| 74 | assert response.status_code == 200 |
| 75 | assert response.text == "app shell" |
| 76 | |
| 77 | |
| 78 | def test_frontend_static_files_lookup_errors(monkeypatch, tmp_path: Path): |
nothing calls this directly
no test coverage detected
searching dependent graphs…