コード例 #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
ファイル: test_base_unit.py プロジェクト: agiledata/pkglib
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('') == ''