focus_Guard_test / tests /test_health_endpoint.py
Yingtao-Zheng's picture
Put all the models together (expect UI)
8c24a08
import pytest
from fastapi.testclient import TestClient
from main import app
client = TestClient(app)
def test_health_endpoint_ok():
resp = client.get("/health")
assert resp.status_code == 200
data = resp.json()
assert "status" in data
assert isinstance(data["status"], str)
assert "models_loaded" in data
assert isinstance(data["models_loaded"], list)