Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 2 additions & 6 deletions totals_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,6 @@
# Entry types whose amount MUST be negative (total.json: exclusiveMaximum 0).
_NEGATIVE_TYPES = frozenset({"discount", "items_discount"})

# A percentage discount code recognized by the reference data set. If the
# server under test does not recognize it, the discount-sign test skips.
_DISCOUNT_CODE = "10OFF"


class TotalsTest(integration_test_utils.IntegrationTestBase):
"""Structural-integrity tests for the checkout ``totals`` breakdown.

Expand Down Expand Up @@ -85,8 +80,9 @@ def _discounted_checkout_totals(self) -> list[dict]:
"""
checkout_json = self.create_checkout_session(select_fulfillment=True)
checkout_obj = checkout.Checkout(**checkout_json)
discount_code = self.fixture_ctx.get_test_discount_code()
updated = self.update_checkout_session(
checkout_obj, discounts={"codes": [_DISCOUNT_CODE]}
checkout_obj, discounts={"codes": [discount_code]}
)
totals = updated.get("totals")
self.assertIsInstance(
Expand Down
Loading