示例#1
0
def test_capture_bridge_processing_error():
    capture = bridge_oscar.CaptureBridge(1)

    try:
        capture.process()
    except oscar_exceptions.GatewayError:
        assert True
    else:
        assert False
示例#2
0
def test_capture_bridge_payment_error():
    capture = bridge_oscar.CaptureBridge(1)

    try:
        capture.process()
    except oscar_exceptions.PaymentError:
        assert True
    else:
        assert False
示例#3
0
def test_capture_bridge_valid():
    capture = bridge_oscar.CaptureBridge(1)

    try:
        capture.process()
    except (oscar_exceptions.GatewayError, oscar_exceptions.PaymentError):
        assert False
    else:
        assert True
示例#4
0
def test_capture_bridge_django_error():
    capture = bridge_oscar.CaptureBridge(1)

    capture_instance = capture.process()

    assert capture_instance is None