"""Development handler.""" import json from pathlib import Path from unittest.mock import MagicMock from app import handler def run(): """Lambda entry point for local development and testing. This function constructs a mock S3 event that mimics the expected AdjustmentsJsonValidation event schema. """ sample_event_path = Path(__file__).parent / 'tests/sample_event.json' with open(sample_event_path, 'r') 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:adjustments_json_validation' ) context.memory_limit_in_mb = '1024' handler(event, context) if __name__ == '__main__': run()