From 544fc07b823fc77f92e8c402a1368ea0dca57153 Mon Sep 17 00:00:00 2001 From: XiaolongZhang Date: Mon, 3 Aug 2026 10:44:48 +0800 Subject: [PATCH] fix: use configured base price in fulfillment total assertion test_fulfillment_flow hardcoded 3500 as the item base price when computing expected_total, while every other test resolves it via fixture_ctx.get_test_price(). The hardcoded 3500 only matches the default flower_shop fixture (35.00 -> 3500); any fixture configured with a different item price would fail the total assertion even though the server behaved correctly. get_test_price() already returns minor units, so this is a pure substitution with no unit conversion. --- fulfillment_test.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/fulfillment_test.py b/fulfillment_test.py index 2b8235d..601efd2 100644 --- a/fulfillment_test.py +++ b/fulfillment_test.py @@ -134,7 +134,9 @@ def test_fulfillment_flow(self) -> None: ) final_checkout = checkout.Checkout(**response_json) - expected_total = 3500 + option_cost # Base 3500 + shipping + expected_total = ( + self.fixture_ctx.get_test_price() + option_cost + ) # base price + shipping total_obj = next( (t for t in final_checkout.totals if t.type == "total"), None )