Exemplo n.º 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
Exemplo n.º 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
Exemplo n.º 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
Exemplo n.º 4
0
def test_capture_bridge_django_error():
    capture = bridge_oscar.CaptureBridge(1)

    capture_instance = capture.process()

    assert capture_instance is None