cmmc-platform/tests/test_health.py

14 lines
412 B
Python

import pytest
from httpx import AsyncClient, ASGITransport
from src.services.app.main import app
@pytest.mark.asyncio
async def test_healthz():
transport = ASGITransport(app=app, raise_app_exceptions=True)
async with AsyncClient(transport=transport, base_url="http://test") as ac:
resp = await ac.get("/healthz")
assert resp.status_code == 200
assert resp.json() == {"status": "pong"}