Skip to content

Commit

Permalink
fix(event_source): fix typo in physicalname attribute for AmazonMQ ev…
Browse files Browse the repository at this point in the history
…ents (#4053)

* Fix bug #4051

* Fix tests

---------

Co-authored-by: Stan Zubarev <[email protected]>
Co-authored-by: Leandro Damascena <[email protected]>
  • Loading branch information
3 people authored Apr 2, 2024
1 parent 9320451 commit 0f4177b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
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 comments on commit 0f4177b

Please sign in to comment.