mantimon-tcg/backend/tests/test_health.py
Cal Corum 234e9a95c1 Add backend foundation with uv, Black, and pre-commit hooks
- Initialize FastAPI backend with uv package manager
- Configure Black, Ruff, pytest, mypy in pyproject.toml
- Add health check endpoint and initial test
- Create AGENTS.md with coding guidelines for AI agents
- Add pre-commit hook to enforce linting and tests
2026-01-24 00:12:33 -06:00

24 lines
585 B
Python

"""Tests for health check endpoint."""
import pytest
from fastapi.testclient import TestClient
from app.main import app
@pytest.fixture
def client() -> TestClient:
"""Create a test client for the FastAPI app."""
return TestClient(app)
def test_health_check(client: TestClient) -> None:
"""
Test that the health check endpoint returns a healthy status.
This verifies the application is running and can respond to requests.
"""
response = client.get("/health")
assert response.status_code == 200
assert response.json() == {"status": "healthy"}