(tmp_path: Path)
| 53 | |
| 54 | |
| 55 | def test_frontend_fallback_rejects_invalid_fallback(tmp_path: Path): |
| 56 | dist = tmp_path / "dist" |
| 57 | dist.mkdir() |
| 58 | app = FastAPI() |
| 59 | |
| 60 | with pytest.raises(AssertionError, match="fallback"): |
| 61 | app.frontend("/", directory=dist, fallback="invalid") # type: ignore[arg-type] # ty: ignore[invalid-argument-type] |
| 62 | |
| 63 | |
| 64 | def test_index_fallback_ignores_invalid_q_value(tmp_path: Path): |