Files
estimator/tests/unit/test_health.py
T

14 lines
449 B
Python

from fastapi.testclient import TestClient
from estimator.api.app import create_app
from estimator.config.settings import Settings
def test_health(monkeypatch, dsn):
monkeypatch.setenv("EST_DATABASE__DSN", dsn)
monkeypatch.setenv("EST_LLM__ANTHROPIC__API_KEY", "sk-test")
with TestClient(create_app(Settings())) as client:
r = client.get("/health")
assert r.status_code == 200
assert r.json()["status"] == "ok"