Пример #1
0
def test_preauthorize_bridge_payment_error():
    preauth = bridge_oscar.PreauthorizeBridge('1', card=MockCreditCard())

    try:
        preauth.process()
    except oscar_exceptions.PaymentError:
        assert True
    else:
        assert False
Пример #2
0
def test_preauthorize_bridge_valid():
    preauth = bridge_oscar.PreauthorizeBridge('1', card=MockCreditCard())

    try:
        preauth.process()
    except (oscar_exceptions.GatewayError, oscar_exceptions.PaymentError):
        assert False
    else:
        assert True
Пример #3
0
def test_preauthorize_bridge_django_error():
    preauth = bridge_oscar.PreauthorizeBridge('1', card=MockCreditCard())

    preauthorize_instance = preauth.process()

    assert preauthorize_instance is None