From 682f18e51db26546061fcdd02b7b18d3963b382a 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 | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/fulfillment_test.py b/fulfillment_test.py index 8b82f02..97d3870 100644 --- a/fulfillment_test.py +++ b/fulfillment_test.py @@ -254,7 +254,8 @@ def test_unknown_customer_no_address(self) -> None: # Verify no destinations injected method = updated_checkout.model_extra["fulfillment"]["methods"][0] - self.assertIsNone(method.get("destinations")) + destinations = method.get("destinations") + self.assertTrue(destinations is None or len(destinations) == 0) def test_known_customer_no_address(self) -> None: """Test that a known customer with no stored address gets no injection.""" @@ -280,7 +281,8 @@ def test_known_customer_no_address(self) -> None: updated_checkout = checkout.Checkout(**response_json) method = updated_checkout.model_extra["fulfillment"]["methods"][0] - self.assertIsNone(method.get("destinations")) + destinations = method.get("destinations") + self.assertTrue(destinations is None or len(destinations) == 0) def test_known_customer_one_address(self) -> None: """Test that a known customer with an address gets it injected."""