(tmp_path: Path)
| 978 | |
| 979 | |
| 980 | def test_head_fallback_request_works(tmp_path: Path): |
| 981 | dist = tmp_path / "dist" |
| 982 | write_file(dist / "index.html", "app shell") |
| 983 | app = FastAPI() |
| 984 | app.frontend("/", directory=dist, fallback="index.html") |
| 985 | |
| 986 | response = TestClient(app).head( |
| 987 | "/dashboard/settings", headers={"accept": "text/html"} |
| 988 | ) |
| 989 | |
| 990 | assert response.status_code == 200 |
| 991 | assert response.text == "" |
| 992 | assert response.headers["content-length"] == "9" |
| 993 | |
| 994 | |
| 995 | def test_unsupported_methods_return_405(tmp_path: Path): |
nothing calls this directly
no test coverage detected
searching dependent graphs…