diff --git a/webhook_test.py b/webhook_test.py index 005c39c..c28cf58 100644 --- a/webhook_test.py +++ b/webhook_test.py @@ -133,7 +133,11 @@ def test_webhook_order_address_known_customer(self) -> None: checkout_obj, fulfillment={ "methods": [ - {"id": "method_1", "line_item_ids": ["item_123"], "type": "shipping"} + { + "id": "method_1", + "line_item_ids": [checkout_obj.line_items[0].id], + "type": "shipping", + } ] }, ) @@ -163,7 +167,7 @@ def test_webhook_order_address_known_customer(self) -> None: "methods": [ { "id": "method_1", - "line_item_ids": ["item_1"], + "line_item_ids": [checkout_obj.line_items[0].id], "type": "shipping", "selected_destination_id": dest_id, } @@ -188,13 +192,13 @@ def test_webhook_order_address_known_customer(self) -> None: "methods": [ { "id": "method_1", - "line_item_ids": ["item_1"], + "line_item_ids": [checkout_obj.line_items[0].id], "type": "shipping", "selected_destination_id": dest_id, "groups": [ { "id": "group_1", - "line_item_ids": ["item_1"], + "line_item_ids": [checkout_obj.line_items[0].id], "selected_option_id": option_id, } ], @@ -237,7 +241,7 @@ def test_webhook_order_address_new_address(self) -> None: "methods": [ { "id": "method_1", - "line_item_ids": ["item_123"], + "line_item_ids": [checkout_obj.line_items[0].id], "type": "shipping", "destinations": [new_address], "selected_destination_id": "dest_new_webhook", @@ -262,13 +266,15 @@ def test_webhook_order_address_new_address(self) -> None: fulfillment_payload["methods"][0]["groups"] = [ { "id": "group_1", - "line_item_ids": ["item_123"], + "line_item_ids": [checkout_obj.line_items[0].id], "selected_option_id": option_id, } ] fulfillment_payload["methods"][0]["type"] = "shipping" fulfillment_payload["methods"][0]["id"] = "method_1" - fulfillment_payload["methods"][0]["line_item_ids"] = ["item_123"] + fulfillment_payload["methods"][0]["line_item_ids"] = [ + checkout_obj.line_items[0].id + ] self.update_checkout_session( checkout_obj, fulfillment=fulfillment_payload )