From db769119cef2e6db36c29c2ca51c9f55223d9e51 Mon Sep 17 00:00:00 2001 From: XiaolongZhang Date: Wed, 29 Jul 2026 21:31:25 +0800 Subject: [PATCH] fix: unwrap payment payload in order_test update requests get_valid_payment_payload() returns {"payment": {...}, "risk_signals": {}} (the full request body), but two update_checkout payloads in order_test.py assigned the whole dict to the "payment" key, producing a double-nested payment.payment.instruments and a stray risk_signals field. This would fail against a server that strictly validates the payment object on update. Extract ["payment"] so the payload matches the contract used by every other call site. --- order_test.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/order_test.py b/order_test.py index b86dc68..4b433f2 100644 --- a/order_test.py +++ b/order_test.py @@ -115,7 +115,7 @@ def test_order_fulfillment_retrieval(self) -> None: } for li in checkout_obj.line_items ], - "payment": integration_test_utils.get_valid_payment_payload(), + "payment": integration_test_utils.get_valid_payment_payload()["payment"], "fulfillment": fulfillment_payload, } @@ -231,7 +231,7 @@ def test_order_update(self) -> None: } for li in checkout_obj.line_items ], - "payment": integration_test_utils.get_valid_payment_payload(), + "payment": integration_test_utils.get_valid_payment_payload()["payment"], "fulfillment": fulfillment_payload, }