Beispiel #1
0
def test_get_transport():
    assert type(get_transport(None, FakeOsModule("1"))) == PycurlTransport
    assert type(get_transport(None, FakeOsModule("TRUE"))) == PycurlTransport
    assert type(get_transport(None, FakeOsModule("0"))) == Urllib2Transport
    assert type(get_transport('urllib',
                              FakeOsModule("TRUE"))) == Urllib2Transport
    assert type(get_transport('curl', FakeOsModule("TRUE"))) == PycurlTransport
def test_get_transport():
    assert type(get_transport(None, FakeOsModule("1"))) == PycurlTransport
    assert type(get_transport(None, FakeOsModule("TRUE"))) == PycurlTransport
    assert type(get_transport(None, FakeOsModule("0"))) == Urllib2Transport
    assert type(get_transport('urllib', FakeOsModule("TRUE"))) == Urllib2Transport
    assert type(get_transport('curl', FakeOsModule("TRUE"))) == PycurlTransport