Skip to content

Commit f281ecd

Browse files
committed
test: add health endpoint smoke test
1 parent b164ec8 commit f281ecd

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

tests/test_health.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import pytest
2+
from httpx import AsyncClient
3+
4+
from app.main import app
5+
6+
7+
@pytest.mark.asyncio
8+
async def test_health_endpoint():
9+
async with AsyncClient(app=app, base_url="http://test") as ac:
10+
resp = await ac.get("/health")
11+
assert resp.status_code == 200
12+
assert resp.json() == {"status": "ok"}

0 commit comments

Comments
 (0)