Example #1
0
def test_valid_voucher_min_amount_spent(settings, min_amount_spent, value):
    voucher = Voucher(code='unique',
                      type=VoucherType.SHIPPING,
                      discount_value_type=DiscountValueType.FIXED,
                      discount_value=Money(10, 'USD'),
                      min_amount_spent=min_amount_spent)
    voucher.validate_min_amount_spent(TaxedMoney(net=value, gross=value))
Example #2
0
def test_valid_voucher_min_amount_spent(settings, min_amount_spent, value):
    voucher = Voucher(
        code="unique",
        type=VoucherType.SHIPPING,
        discount_value_type=DiscountValueType.FIXED,
        discount_value=Money(10, "USD"),
        min_amount_spent=min_amount_spent,
    )
    voucher.validate_min_amount_spent(TaxedMoney(net=value, gross=value))
Example #3
0
def test_valid_voucher_min_amount_spent(min_amount_spent, value):
    voucher = Voucher(
        code="unique",
        type=VoucherType.SHIPPING,
        discount_value_type=DiscountValueType.FIXED,
        discount_value=Money(10, "USD"),
        min_amount_spent=min_amount_spent,
    )
    voucher.validate_min_amount_spent(value)