Skip to content

Commit 0f4177b

Browse files
SZubarevStan Zubarevleandrodamascena
authored
fix(event_source): fix typo in physicalname attribute for AmazonMQ events (#4053)
* Fix bug #4051 * Fix tests --------- Co-authored-by: Stan Zubarev <[email protected]> Co-authored-by: Leandro Damascena <[email protected]>
1 parent 9320451 commit 0f4177b

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

aws_lambda_powertools/utilities/data_classes/active_mq_event.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ def properties(self) -> dict:
5959

6060
@property
6161
def destination_physicalname(self) -> str:
62-
return self["destination"]["physicalname"]
62+
return self["destination"]["physicalName"]
6363

6464
@property
6565
def delivery_mode(self) -> Optional[int]:

tests/events/activeMQEvent.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"connectionId": "myJMSCoID",
1010
"redelivered": false,
1111
"destination": {
12-
"physicalname": "testQueue"
12+
"physicalName": "testQueue"
1313
},
1414
"timestamp": 1598827811958,
1515
"brokerInTime": 1598827811958,
@@ -25,7 +25,7 @@
2525
"connectionId": "myJMSCoID2",
2626
"redelivered": false,
2727
"destination": {
28-
"physicalname": "testQueue"
28+
"physicalName": "testQueue"
2929
},
3030
"timestamp": 1598827811958,
3131
"brokerInTime": 1598827811958,
@@ -42,7 +42,7 @@
4242
"connectionId": "myJMSCoID1",
4343
"persistent": false,
4444
"destination": {
45-
"physicalname": "testQueue"
45+
"physicalName": "testQueue"
4646
},
4747
"timestamp": 1598827811958,
4848
"brokerInTime": 1598827811958,

tests/unit/data_classes/test_active_mq_event.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ def test_active_mq_event():
2727
assert message.broker_in_time == raw_event["messages"][0]["brokerInTime"]
2828
assert message.broker_out_time == raw_event["messages"][0]["brokerOutTime"]
2929
assert message.properties.get("testKey") == raw_event["messages"][0]["properties"]["testKey"]
30-
assert message.destination_physicalname == raw_event["messages"][0]["destination"]["physicalname"]
30+
assert message.destination_physicalname == raw_event["messages"][0]["destination"]["physicalName"]
3131
assert message.delivery_mode is None
3232
assert message.correlation_id is None
3333
assert message.reply_to is None

0 commit comments

Comments
 (0)