From 2b4672f55a225f6d44fdba480d1518ed5d91b108 Mon Sep 17 00:00:00 2001 From: XiaolongZhang Date: Fri, 31 Jul 2026 12:03:58 +0800 Subject: [PATCH] fix: use configured fixed-discount amount in business_logic_test test_fixed_amount_discount fetched the expected reduction into expected_discount and already passed it to assert_totals_consistent, but the separate assertion on discounts.applied[0].amount hardcoded 500 instead of using that variable. Any non-default fixture (e.g. a 7.50 fixed reduction) would fail the second assertion even though the totals check passed. get_expected_fixed_discount_reduction() already returns minor units, so the hardcoded 500 only matched the default flower_shop fixture by coincidence. --- business_logic_test.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/business_logic_test.py b/business_logic_test.py index 2719cf0..957c556 100644 --- a/business_logic_test.py +++ b/business_logic_test.py @@ -390,7 +390,8 @@ def test_fixed_amount_discount(self): ) self.assertEqual( discounts_obj.applied[0].amount, - 500, + expected_discount, + "applied discount amount must match the configured fixed reduction", ) def test_buyer_consent(self):