Files
enduro-trails/tests/unit/test_health.py
claude-bot 76ff0c6587
Some checks failed
CI / lint (push) Failing after 16s
CI / test (push) Failing after 2s
CI / build (push) Has been skipped
CI / lint (pull_request) Failing after 3s
CI / test (pull_request) Failing after 2s
CI / build (pull_request) Has been skipped
feat: add pyproject.toml, dev dependencies, first unit test
2026-05-15 17:05:46 +03:00

14 lines
418 B
Python

import pytest
from httpx import AsyncClient, ASGITransport
from src.api.main import app
@pytest.mark.asyncio
async def test_health_endpoint():
transport = ASGITransport(app=app)
async with AsyncClient(transport=transport, base_url="http://test") as client:
resp = await client.get("/api/health")
assert resp.status_code == 200
data = resp.json()
assert data["status"] == "ok"