fix: add tests that check some of the issues are already fixed (#905)

* Add tests that check some of the issues are already fixed

* Fix test formatting
This commit is contained in:
Sergey Mankovsky
2026-03-10 17:58:53 +01:00
committed by GitHub
parent 22a50bb94d
commit b53c8da398
7 changed files with 158 additions and 3 deletions

17
server/tests/test_app.py Normal file
View File

@@ -0,0 +1,17 @@
"""Tests for app-level endpoints (root, not under /v1)."""
import pytest
@pytest.mark.asyncio
async def test_health_endpoint_returns_healthy():
"""GET /health returns 200 and {"status": "healthy"} for probes and CI."""
from httpx import AsyncClient
from reflector.app import app
# Health is at app root, not under /v1
async with AsyncClient(app=app, base_url="http://test") as root_client:
response = await root_client.get("/health")
assert response.status_code == 200
assert response.json() == {"status": "healthy"}