aboutsummaryrefslogtreecommitdiffstats
path: root/thallium-backend/tests/test_app.py
diff options
context:
space:
mode:
authorGravatar Chris Lovering <[email protected]>2024-08-19 20:55:14 +0100
committerGravatar Chris Lovering <[email protected]>2024-08-19 20:55:14 +0100
commit1a65b54c77d53ae755c5cb3fa6a8241667813f07 (patch)
treecef6c1ded5b6010976e34916d9032dbf0ca5995c /thallium-backend/tests/test_app.py
parentDrop static file mount (diff)
Add conftest for access to database
Diffstat (limited to 'thallium-backend/tests/test_app.py')
-rw-r--r--thallium-backend/tests/test_app.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/thallium-backend/tests/test_app.py b/thallium-backend/tests/test_app.py
index c7c4937..254bb18 100644
--- a/thallium-backend/tests/test_app.py
+++ b/thallium-backend/tests/test_app.py
@@ -1,9 +1,9 @@
-from fastapi.testclient import TestClient
+import pytest
+from httpx import AsyncClient
-from src.app import fastapi_app
-
-def test_heartbeat() -> None:
+async def test_heartbeat(http_client: AsyncClient) -> None:
"""Ensure the heartbeat works."""
- with TestClient(app=fastapi_app) as client:
- assert client.get("/heartbeat").json() == {"detail": "I am alive!"}
+ resp = await http_client.get("/heartbeat")
+ assert resp.json() == {"detail": "I am alive!"}