(tmp_path: Path, test_client_factory: TestClientFactory)
| 303 | |
| 304 | |
| 305 | def test_file_response_with_directory_raises_error(tmp_path: Path, test_client_factory: TestClientFactory) -> None: |
| 306 | app = FileResponse(path=tmp_path, filename="example.png") |
| 307 | client = test_client_factory(app) |
| 308 | with pytest.raises(RuntimeError) as exc_info: |
| 309 | client.get("/") |
| 310 | assert "is not a file" in str(exc_info.value) |
| 311 | |
| 312 | |
| 313 | def test_file_response_with_missing_file_raises_error(tmp_path: Path, test_client_factory: TestClientFactory) -> None: |
nothing calls this directly
no test coverage detected