Ejemplo n.º 1
0
def test_identifies_known_protocols():
    """ test_protocol_identifies_known_protocols """
    eq_(srmdumps.protocol('davs://some/example'), 'davs')
    eq_(srmdumps.protocol('gsiftp://some/example'), 'gsiftp')
    eq_(srmdumps.protocol('http://some/example'), 'http')
    eq_(srmdumps.protocol('https://some/example'), 'https')
    eq_(srmdumps.protocol('root://some/example'), 'root')
    eq_(srmdumps.protocol('srm://some/example'), 'srm')
Ejemplo n.º 2
0
def test_identifies_known_protocols():
    """ test_protocol_identifies_known_protocols """
    assert srmdumps.protocol('davs://some/example') == 'davs'
    assert srmdumps.protocol('gsiftp://some/example') == 'gsiftp'
    assert srmdumps.protocol('http://some/example') == 'http'
    assert srmdumps.protocol('https://some/example') == 'https'
    assert srmdumps.protocol('root://some/example') == 'root'
    assert srmdumps.protocol('srm://some/example') == 'srm'
Ejemplo n.º 3
0
def test_fails_on_unknown_protocol():
    """ test_protocol_fails_on_unknown_protocol """
    srmdumps.protocol('fake://some/example')
Ejemplo n.º 4
0
def test_identifies_http_and_srm():
    """ test_protocol_identifies_http_and_srm """
    eq_(srmdumps.protocol('http://some/example'), 'http')
    eq_(srmdumps.protocol('srm://some/example'), 'srm')
Ejemplo n.º 5
0
def test_fails_on_unknown_protocol():
    """ test_protocol_fails_on_unknown_protocol """
    with pytest.raises(RuntimeError):
        srmdumps.protocol('fake://some/example')