"""Tests for the main FastAPI application.""" from fastapi.testclient import TestClient from app import app client = TestClient(app) def test_root_endpoint(): """Test the root endpoint.""" response = client.get("/") assert response.status_code == 200 data = response.json() assert data["status"] == "healthy" assert "timestamp" in data assert "version" in data assert "environment" in data def test_health_endpoint(): """Test the health check endpoint.""" response = client.get("/health") assert response.status_code == 200 data = response.json() assert "status" in data assert data["status"] in ["healthy", "degraded", "unhealthy"] assert "timestamp" in data assert "version" in data assert "environment" in data def test_faces_root_endpoint(): """Test the faces root endpoint.""" response = client.get("/api/v1/faces/") assert response.status_code == 200 data = response.json() assert "message" in data