"""Development handler.""" import json from pathlib import Path from unittest.mock import MagicMock from app import handler def run() -> None: """Lambda entry point for local development and testing.""" sample_event_path = Path(__file__).parent / 'tests' / 'sample_event.json' with open(sample_event_path) as f: event = json.load(f) context = MagicMock() context.aws_request_id = 'local-dev-request-id' context.invoked_function_arn = ( 'arn:aws:lambda:us-east-1:123456789012:function:earnings_transfer' ) context.memory_limit_in_mb = '1024' handler(event, context) if __name__ == '__main__': run()