
- Set up project structure and dependencies - Create task model and schema - Implement Alembic migrations - Add CRUD API endpoints for task management - Add health endpoint with database connectivity check - Add comprehensive error handling - Add tests for API endpoints - Update README with API documentation
14 lines
354 B
Python
14 lines
354 B
Python
from fastapi import status
|
|
|
|
|
|
def test_health_endpoint(client):
|
|
"""
|
|
Test the health endpoint returns correct response.
|
|
"""
|
|
response = client.get("/health")
|
|
data = response.json()
|
|
|
|
assert response.status_code == status.HTTP_200_OK
|
|
assert data["status"] == "healthy"
|
|
assert "database" in data
|
|
assert "version" in data |