verifile-x-api / backend /tests /test_api.py
abinazebinoy's picture
Add statistical modeling (19 signals, 92-97% accuracy) (#26)
bca278f
raw
history blame contribute delete
604 Bytes
"""
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