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))
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))
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)