Automated Action 7658939790 Create Task Manager API with FastAPI and SQLite
- 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
2025-06-04 22:52:31 +00:00

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