Neda/Back/tests/test_health.py
2026-03-06 15:16:41 +03:30

13 lines
381 B
Python

import pytest
from httpx import AsyncClient, ASGITransport
from main import app
@pytest.mark.asyncio
async def test_health_check():
transport = ASGITransport(app=app)
async with AsyncClient(transport=transport, base_url="http://test") as ac:
response = await ac.get("/health")
assert response.status_code == 200
assert response.json() == {"status": "ok"}