Resolve health_endpoint test
CI / lint_and_test (push) Failing after 4m0s Details

This commit is contained in:
itqop 2025-07-19 03:32:12 +03:00
parent 734c7a767d
commit 1b8e7a3c1a
1 changed files with 3 additions and 2 deletions

View File

@ -14,11 +14,12 @@ client = TestClient(app)
@patch("src.app.routers.health.EmbeddingService") @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") response = client.get("/healthz")
assert response.status_code == 200 assert response.status_code == 200
data = response.json() data = response.json()
print("Health check response:", data)
assert "status" in data assert "status" in data
assert data["status"] == "healthy" assert data["status"] == "healthy"