"""Test helpers for Lambda tests.""" import json def make_sqs_event(*bodies: dict) -> dict: """Build a minimal SQS event with the given record bodies.""" records = [] for i, body in enumerate(bodies): records.append( { "messageId": f"msg-{i}", "body": json.dumps(body), "receiptHandle": f"handle-{i}", "attributes": {}, "messageAttributes": {}, "md5OfBody": "", "eventSource": "aws:sqs", "eventSourceARN": "arn:aws:sqs:us-east-1:123456789012:test-queue", "awsRegion": "us-east-1", } ) return {"Records": records}