()
| 11 | |
| 12 | @workdir_lock |
| 13 | def test(): |
| 14 | log = Path("log.txt") |
| 15 | if log.is_file(): |
| 16 | os.remove(log) # pragma: no cover |
| 17 | response = client.post("/send-notification/foo@example.com") |
| 18 | assert response.status_code == 200, response.text |
| 19 | assert response.json() == {"message": "Notification sent in the background"} |
| 20 | with open("./log.txt") as f: |
| 21 | assert "notification for foo@example.com: some notification" in f.read() |