integration_test2 / tests /test_health_endpoint.py
Abdelrahman Almatrooshi
FocusGuard with L2CS-Net gaze estimation
7b53d75
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)