Add ability to set metadata fields in test events
- Dominant language
- Python
- Stars
- 11.1k
- Forks
- 1k
- Avg merge
- 1d 22h
- Merged PRs (30d)
- 2
Description
Currently with test methods like `generate_sqs_event`, `generate_sns_event`, etc. you can only set the message/message body. It would be helpful to have the ability to set some of the metadata fields in these events (e.g. `messageAttributes` in SQS or `MessageAttrirbutes` in SNS), as some of our lambda jobs need this information to function properly. Currently I don't know that there's a way around this, other than changing the actual lambda handler code to add an exception for tests, which isn't ideal.
Contributor guide
Research direction
Start by locating the generate_sqs_event and generate_sns_event test-event helpers, then inspect their existing tests and event-building code. Done means callers can provide metadata such as SQS messageAttributes and SNS MessageAttributes while preserving the current message or body behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, python
- Domain
- testing
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100