8000 fix(event_source): fix typo in physicalname attribute for AmazonMQ events by SZubarev · Pull Request #4053 · aws-powertools/powertools-lambda-python · GitHub
[go: up one dir, main page]

Skip to content

fix(event_source): fix typo in physicalname attribute for AmazonMQ events #4053

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def properties(self) -> dict:

@property
def destination_physicalname(self) -> str:
return self["destination"]["physicalname"]
return self["destination"]["physicalName"]

@property
def delivery_mode(self) -> Optional[int]:
Expand Down
6 changes: 3 additions & 3 deletions tests/events/activeMQEvent.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"connectionId": "myJMSCoID",
"redelivered": false,
"destination": {
"physicalname": "testQueue"
"physicalName": "testQueue"
},
"timestamp": 1598827811958,
"brokerInTime": 1598827811958,
Expand All @@ -25,7 +25,7 @@
"connectionId": "myJMSCoID2",
"redelivered": false,
"destination": {
"physicalname": "testQueue"
"physicalName": "testQueue"
},
"timestamp": 1598827811958,
"brokerInTime": 1598827811958,
Expand All @@ -42,7 +42,7 @@
"connectionId": "myJMSCoID1",
"persistent": false,
"destination": {
"physicalname": "testQueue"
"physicalName": "testQueue"
},
"timestamp": 1598827811958,
"brokerInTime": 1598827811958,
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/data_classes/test_active_mq_event.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def test_active_mq_event():
assert message.broker_in_time == raw_event["messages"][0]["brokerInTime"]
assert message.broker_out_time == raw_event["messages"][0]["brokerOutTime"]
assert message.properties.get("testKey") == raw_event["messages"][0]["properties"]["testKey"]
assert message.destination_physicalname == raw_event["messages"][0]["destination"]["physicalname"]
assert message.destination_physicalname == raw_event["messages"][0]["destination"]["physicalName"]
assert message.delivery_mode is None
assert message.correlation_id is None
assert message.reply_to is None
Expand Down
0