(test_client_factory: TestClientFactory)
| 66 | |
| 67 | |
| 68 | def test_staticfiles_with_package(test_client_factory: TestClientFactory) -> None: |
| 69 | app = StaticFiles(packages=["tests"]) |
| 70 | client = test_client_factory(app) |
| 71 | response = client.get("/example.txt") |
| 72 | assert response.status_code == 200 |
| 73 | assert response.text == "123\n" |
| 74 | |
| 75 | app = StaticFiles(packages=[("tests", "statics")]) |
| 76 | client = test_client_factory(app) |
| 77 | response = client.get("/example.txt") |
| 78 | assert response.status_code == 200 |
| 79 | assert response.text == "123\n" |
| 80 | |
| 81 | |
| 82 | def test_staticfiles_post(tmpdir: Path, test_client_factory: TestClientFactory) -> None: |
nothing calls this directly
no test coverage detected