コード例 #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))
コード例 #2
0
ファイル: test_discounts.py プロジェクト: mirumee/saleor
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))
コード例 #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)