import pytest from app import create_app @pytest.fixture def app(): """Create application for testing.""" app = create_app('development') app.config['TESTING'] = True return app @pytest.fixture def client(app): """Create test client.""" return app.test_client() def test_health_endpoint(client): """Test the health check endpoint.""" response = client.get('/api/health') assert response.status_code == 200 data = response.get_json() assert data['status'] == 'healthy' assert data['service'] == 'nextsnap'