Files
InternalAuditInterprise/backend/tests/test_health.py
T
2026-06-16 00:38:57 +08:00

22 lines
447 B
Python

"""健康检查端点测试。"""
from fastapi.testclient import TestClient
from app.main import app
client = TestClient(app)
def test_health_ok():
resp = client.get("/health")
assert resp.status_code == 200
assert resp.json()["status"] == "ok"
def test_health_config():
resp = client.get("/health/config")
assert resp.status_code == 200
body = resp.json()
assert "env" in body
assert "llm_provider" in body