(tmp_path: Path)
| 965 | |
| 966 | |
| 967 | def test_head_requests_work(tmp_path: Path): |
| 968 | dist = tmp_path / "dist" |
| 969 | write_file(dist / "asset.txt", "ok") |
| 970 | app = FastAPI() |
| 971 | app.frontend("/", directory=dist) |
| 972 | |
| 973 | response = TestClient(app).head("/asset.txt") |
| 974 | |
| 975 | assert response.status_code == 200 |
| 976 | assert response.text == "" |
| 977 | assert response.headers["content-length"] == "2" |
| 978 | |
| 979 | |
| 980 | def test_head_fallback_request_works(tmp_path: Path): |
nothing calls this directly
no test coverage detected
searching dependent graphs…