from fastapi.testclient import TestClient from unittest.mock import patch from main import app client = TestClient(app) def test_root_health(): with patch("app.services.prediction.is_model_available", return_value=True): resp = client.get("/") assert resp.status_code == 200 body = resp.json() assert "status" in body assert "modelLoaded" in body