Exemplo n.º 1
0
def test_verification_bridge_payment_error():
    verification = bridge_oscar.VerificationBridge('1', card=MockCreditCard())

    try:
        verification.process()
    except oscar_exceptions.PaymentError:
        assert True
    else:
        assert False
Exemplo n.º 2
0
def test_verification_bridge_valid():
    verification = bridge_oscar.VerificationBridge('1', card=MockCreditCard())

    try:
        verification.process()
    except (oscar_exceptions.GatewayError, oscar_exceptions.PaymentError):
        assert False
    else:
        assert True
Exemplo n.º 3
0
def test_verification_bridge_django_error():
    verification = bridge_oscar.VerificationBridge('1', card=MockCreditCard())

    verification_instance = verification.process()

    assert verification_instance is None