"""Tests for health routes.""" import pytest from fastapi.testclient import TestClient from notebooklm_agent.api.main import app @pytest.mark.unit class TestHealthEndpoints: """Test suite for health check endpoints.""" def test_health_check_returns_healthy(self): """Should return healthy status.""" # Arrange client = TestClient(app) # Act response = client.get("/health/") # Assert assert response.status_code == 200 data = response.json() assert data["status"] == "healthy" assert "timestamp" in data assert data["service"] == "notebooklm-agent-api" assert data["version"] == "0.1.0" def test_readiness_check_returns_ready(self): """Should return ready status.""" # Arrange client = TestClient(app) # Act response = client.get("/health/ready") # Assert assert response.status_code == 200 data = response.json() assert data["status"] == "ready" assert "timestamp" in data assert "checks" in data def test_liveness_check_returns_alive(self): """Should return alive status.""" # Arrange client = TestClient(app) # Act response = client.get("/health/live") # Assert assert response.status_code == 200 data = response.json() assert data["status"] == "alive" assert "timestamp" in data