feat: add app factory with health endpoint and test infrastructure
This commit is contained in:
parent
fd8c8cbf39
commit
6a8b41cd38
3 changed files with 58 additions and 0 deletions
15
tests/test_app.py
Normal file
15
tests/test_app.py
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
from httpx import AsyncClient
|
||||
|
||||
|
||||
async def test_health_endpoint(client: AsyncClient) -> None:
|
||||
response = await client.get("/health")
|
||||
assert response.status_code == 200
|
||||
data = response.json()
|
||||
assert data["status"] == "ok"
|
||||
|
||||
|
||||
async def test_app_has_title(client: AsyncClient) -> None:
|
||||
response = await client.get("/openapi.json")
|
||||
assert response.status_code == 200
|
||||
data = response.json()
|
||||
assert data["info"]["title"] == "FastAPI OIDC OP"
|
||||
Loading…
Add table
Add a link
Reference in a new issue