File size: 604 Bytes
d91270c
bca278f
d91270c
bca278f
d91270c
 
bca278f
 
d91270c
 
bca278f
 
d91270c
 
bca278f
 
d91270c
 
 
 
bca278f
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
"""
Tests for API endpoints.
"""
import pytest


def test_root_endpoint(client):
    """Test root endpoint returns frontend HTML or API info."""
    response = client.get("/")
    assert response.status_code == 200
    # Root now serves HTML frontend, so check content type
    assert "text/html" in response.headers.get("content-type", "") or response.json()


def test_health_check(client):
    """Test health check endpoint."""
    response = client.get("/health")
    assert response.status_code == 200
    data = response.json()
    assert data["status"] == "healthy"
    assert "timestamp" in data