-
-
Notifications
You must be signed in to change notification settings - Fork 102
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix shipment identifier assignment in create shipment
This change corrects the assignment of the shipment identifier to use `info.shipment_id` instead of `info.tracking_pin`. This ensures that the shipment identifier is correctly set, allowing proper tracking and management of shipments.
- Loading branch information
1 parent
d9afa1f
commit 36217a0
Showing
2 changed files
with
8 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -87,11 +87,11 @@ def test_cancel_shipment(self): | |
info_call, cancel_call = mocks.call_args_list | ||
self.assertEqual( | ||
info_call[1]["url"], | ||
f"{gateway.settings.server_url}/rs/2004381/2004381/shipment/123456789012", | ||
f"{gateway.settings.server_url}/rs/2004381/2004381/shipment/545021584835957806", | ||
) | ||
self.assertEqual( | ||
cancel_call[1]["url"], | ||
f"{gateway.settings.server_url}/rs/2004381/2004381/shipment/123456789012", | ||
f"{gateway.settings.server_url}/rs/2004381/2004381/shipment/545021584835957806", | ||
) | ||
|
||
def test_cancel_transmitted_shipment(self): | ||
|
@@ -103,11 +103,11 @@ def test_cancel_transmitted_shipment(self): | |
info_call, refund_call = mocks.call_args_list | ||
self.assertEqual( | ||
info_call[1]["url"], | ||
f"{gateway.settings.server_url}/rs/2004381/2004381/shipment/123456789012", | ||
f"{gateway.settings.server_url}/rs/2004381/2004381/shipment/545021584835957806", | ||
) | ||
self.assertEqual( | ||
refund_call[1]["url"], | ||
f"{gateway.settings.server_url}/rs/2004381/2004381/shipment/123456789012/refund", | ||
f"{gateway.settings.server_url}/rs/2004381/2004381/shipment/545021584835957806/refund", | ||
) | ||
|
||
def test_parse_shipment_response(self): | ||
|
@@ -156,7 +156,7 @@ def test_parse_multi_piece_shipment_response(self): | |
|
||
|
||
shipment_cancel_data = { | ||
"shipment_identifier": "123456789012", | ||
"shipment_identifier": "545021584835957806", | ||
"options": {"email": "[email protected]"}, | ||
} | ||
|
||
|
@@ -292,7 +292,7 @@ def test_parse_multi_piece_shipment_response(self): | |
"carrier_name": "canadapost", | ||
"carrier_id": "canadapost", | ||
"tracking_number": "123456789012", | ||
"shipment_identifier": "123456789012", | ||
"shipment_identifier": "545021584835957806", | ||
"label_type": "PDF", | ||
"docs": {"label": ANY}, | ||
"meta": { | ||
|
@@ -317,7 +317,7 @@ def test_parse_multi_piece_shipment_response(self): | |
"manifest_required": False, | ||
}, | ||
"label_type": "PDF", | ||
"shipment_identifier": "123456789012", | ||
"shipment_identifier": "545021584835957806", | ||
"tracking_number": "123456789012", | ||
}, | ||
[], | ||
|