示例#1
0
def test_maybe_add_simple_index_already_there():
    dist = Distribution()
    cmd = develop(dist)

    actual = cmd.maybe_add_simple_index('http://foo/simple')
    assert actual == 'http://foo/simple'

    actual = cmd.maybe_add_simple_index('http://foo/simple/')
    assert actual == 'http://foo/simple/'
示例#2
0
def test_maybe_add_simple_index_empty():
    dist = Distribution()
    cmd = develop(dist)
    assert cmd.maybe_add_simple_index('') == ''
示例#3
0
def test_maybe_add_simple_index_develop():
    dist = Distribution()
    cmd = develop(dist)
    assert cmd.maybe_add_simple_index('http://foo') == 'http://foo/simple'
示例#4
0
def test_maybe_add_simple_index_develop():
    with patch.object(base, 'CONFIG', TEST_CONFIG):
        dist = Distribution()
        cmd = develop.develop(dist)
        assert cmd.maybe_add_simple_index('http://foo') == 'http://foo/simple'
示例#5
0
def test_maybe_add_simple_index_empty():
    with patch.object(base, 'CONFIG', TEST_CONFIG):
        dist = Distribution()
        cmd = develop(dist)
        assert cmd.maybe_add_simple_index('') == ''