(app: FastAPI)
| 15 | |
| 16 | @workdir_lock |
| 17 | def test_events(app: FastAPI): |
| 18 | with TestClient(app) as client: |
| 19 | response = client.get("/items/") |
| 20 | assert response.status_code == 200, response.text |
| 21 | assert response.json() == [{"name": "Foo"}] |
| 22 | with open("log.txt") as log: |
| 23 | assert "Application shutdown" in log.read() |
| 24 | |
| 25 | |
| 26 | @workdir_lock |