Skip to content

Commit

Permalink
fix: fedex_ws requests with invalid encodings
Browse files Browse the repository at this point in the history
  • Loading branch information
danh91 committed Sep 29, 2024
1 parent d48b65b commit ba8bc61
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -74,5 +74,5 @@ def _request_serializer(request: PickupAvailabilityRequest) -> str:

return XP.export(
envelope,
namespacedef_='xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:v22="http://fedex.com/ws/pickup/v22"',
namespacedef_='xmlns:tns="http://schemas.xmlsoap.org/soap/envelope/" xmlns:v22="http://fedex.com/ws/pickup/v22"',
)
Original file line number Diff line number Diff line change
Expand Up @@ -79,5 +79,5 @@ def _request_serializer(request: CancelPickupRequest) -> str:

return XP.export(
envelope,
namespacedef_='xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:v22="http://fedex.com/ws/pickup/v22"',
namespacedef_='xmlns:tns="http://schemas.xmlsoap.org/soap/envelope/" xmlns:v22="http://fedex.com/ws/pickup/v22"',
)
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ def _request_serializer(request: CreatePickupRequest) -> str:

return XP.export(
envelope,
namespacedef_='xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:v22="http://fedex.com/ws/pickup/v22"',
namespacedef_='xmlns:tns="http://schemas.xmlsoap.org/soap/envelope/" xmlns:v22="http://fedex.com/ws/pickup/v22"',
)


Expand Down
10 changes: 5 additions & 5 deletions modules/connectors/fedex_ws/tests/fedex_ws/test_pickup.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ def test_parse_pickup_cancel_reply(self):
]


PickupAvailabilityRequestXML = """<tns:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:v22="http://fedex.com/ws/pickup/v22">
PickupAvailabilityRequestXML = """<tns:Envelope xmlns:tns="http://schemas.xmlsoap.org/soap/envelope/" xmlns:v22="http://fedex.com/ws/pickup/v22">
<tns:Body>
<v22:PickupAvailabilityRequest>
<v22:WebAuthenticationDetail>
Expand Down Expand Up @@ -206,7 +206,7 @@ def test_parse_pickup_cancel_reply(self):
</tns:Envelope>
"""

PickupRequestXML = """<tns:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:v22="http://fedex.com/ws/pickup/v22">
PickupRequestXML = """<tns:Envelope xmlns:tns="http://schemas.xmlsoap.org/soap/envelope/" xmlns:v22="http://fedex.com/ws/pickup/v22">
<tns:Body>
<v22:CreatePickupRequest>
<v22:WebAuthenticationDetail>
Expand Down Expand Up @@ -261,7 +261,7 @@ def test_parse_pickup_cancel_reply(self):
</tns:Envelope>
"""

PickupUpdateAvailabilityRequestXML = """<tns:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:v22="http://fedex.com/ws/pickup/v22">
PickupUpdateAvailabilityRequestXML = """<tns:Envelope xmlns:tns="http://schemas.xmlsoap.org/soap/envelope/" xmlns:v22="http://fedex.com/ws/pickup/v22">
<tns:Body>
<v22:PickupAvailabilityRequest>
<v22:WebAuthenticationDetail>
Expand Down Expand Up @@ -300,7 +300,7 @@ def test_parse_pickup_cancel_reply(self):
</tns:Envelope>
"""

PickupUpdateRequestXML = """<tns:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:v22="http://fedex.com/ws/pickup/v22">
PickupUpdateRequestXML = """<tns:Envelope xmlns:tns="http://schemas.xmlsoap.org/soap/envelope/" xmlns:v22="http://fedex.com/ws/pickup/v22">
<tns:Body>
<v22:CreatePickupRequest>
<v22:WebAuthenticationDetail>
Expand Down Expand Up @@ -353,7 +353,7 @@ def test_parse_pickup_cancel_reply(self):
</tns:Envelope>
"""

PickupCancelRequestXML = """<tns:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:v22="http://fedex.com/ws/pickup/v22">
PickupCancelRequestXML = """<tns:Envelope xmlns:tns="http://schemas.xmlsoap.org/soap/envelope/" xmlns:v22="http://fedex.com/ws/pickup/v22">
<tns:Body>
<v22:CancelPickupRequest>
<v22:WebAuthenticationDetail>
Expand Down

0 comments on commit ba8bc61

Please sign in to comment.