コード例 #1
0
def test_braintree_payment_form(payment_dummy):
    payment = payment_dummy

    data = {"amount": payment.total, "payment_method_nonce": "fake-nonce"}
    payment_info = create_payment_information(payment)

    form = create_form(data=data, payment_information=payment_info)

    assert isinstance(form, BraintreePaymentForm)
    assert form.is_valid()
コード例 #2
0
def test_braintree_payment_form(payment_dummy):
    payment = payment_dummy

    data = {'amount': payment.total, 'payment_method_nonce': 'fake-nonce'}
    payment_info = create_payment_information(payment)

    form = create_form(data=data,
                       payment_information=payment_info,
                       connection_params={'secret': '123'})

    assert isinstance(form, BraintreePaymentForm)
    assert form.is_valid()
コード例 #3
0
def test_braintree_payment_form(payment_dummy):
    payment = payment_dummy

    data = {'amount': payment.total, 'payment_method_nonce': 'fake-nonce'}
    payment_info = create_payment_information(payment)

    form = create_form(
        data=data, payment_information=payment_info,
        connection_params={'secret': '123'})

    assert isinstance(form, BraintreePaymentForm)
    assert form.is_valid()
コード例 #4
0
ファイル: test_braintree.py プロジェクト: mirumee/saleor
def test_braintree_payment_form(payment_dummy):
    payment = payment_dummy

    data = {"amount": payment.total, "payment_method_nonce": "fake-nonce"}
    payment_info = create_payment_information(payment)

    form = create_form(
        data=data, payment_information=payment_info, connection_params={"secret": "123"}
    )

    assert isinstance(form, BraintreePaymentForm)
    assert form.is_valid()