final_test / tests /test_health_endpoint.py
Abdelrahman Almatrooshi
Deploy snapshot from main b7a59b11809483dfc959f196f1930240f2662c49
22a6915
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)