"""Functional tests - directly invokes handler with real S3 and Neo4j.""" import json from pathlib import Path from src.app import handler def test_handler_direct(): """Test handler directly with real S3 and Neo4j connections.""" event_path = Path(__file__).parent.parent / "sample_event.json" with open(event_path) as f: event = json.load(f) result = handler(event, None) print(f"\nHandler result: {json.dumps(result, indent=2)}") assert "total_rows" in result assert "successful_rows" in result assert "failed_rows" in result assert result["successful_rows"] + result["failed_rows"] == result["total_rows"] assert result["total_rows"] > 0