14 lines
449 B
Python
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"
|