From 48dc94621cd2827e7d192356f41d953bbe707141 Mon Sep 17 00:00:00 2001 From: Maksim Semenov Date: Thu, 22 Jan 2026 09:05:52 +0000 Subject: [PATCH] Fix None vs empty list issue in fulfillment tests --- fulfillment_test.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/fulfillment_test.py b/fulfillment_test.py index 9557acd..5085ca8 100644 --- a/fulfillment_test.py +++ b/fulfillment_test.py @@ -213,7 +213,9 @@ def test_unknown_customer_no_address(self) -> None: # Verify no destinations injected method = updated_checkout.fulfillment.root.methods[0] - self.assertIsNone(method.destinations) + self.assertTrue( + method.destinations is None or len(method.destinations) == 0 + ) def test_known_customer_no_address(self) -> None: """Test that a known customer with no stored address gets no injection.""" @@ -230,7 +232,9 @@ def test_known_customer_no_address(self) -> None: updated_checkout = checkout.Checkout(**response_json) method = updated_checkout.fulfillment.root.methods[0] - self.assertIsNone(method.destinations) + self.assertTrue( + method.destinations is None or len(method.destinations) == 0 + ) def test_known_customer_one_address(self) -> None: """Test that a known customer with an address gets it injected."""