IntegrationTest / tests /test_health_endpoint.py
Yingtao-Zheng's picture
Add other files and folders, including data related, notebook, test and evaluation
24a5e7e
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)