From 1b8e7a3c1a19f9eac13e3ef3562b39fc0137d67b Mon Sep 17 00:00:00 2001 From: itqop Date: Sat, 19 Jul 2025 03:32:12 +0300 Subject: [PATCH] Resolve health_endpoint test --- src/tests/test_api.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/tests/test_api.py b/src/tests/test_api.py index a458105..88c3dca 100644 --- a/src/tests/test_api.py +++ b/src/tests/test_api.py @@ -14,11 +14,12 @@ client = TestClient(app) @patch("src.app.routers.health.EmbeddingService") -def test_health_endpoint(mock_embedding_service): +@patch("src.app.routers.health.ChromaStore") +def test_health_endpoint(mock_embedding_service, mock_chroma_store): + mock_chroma_store.return_value.get_count.return_value = 1 response = client.get("/healthz") assert response.status_code == 200 data = response.json() - print("Health check response:", data) assert "status" in data assert data["status"] == "healthy"