Пример #1
0
def test_unauthed_download_location():
    uar = Repository(repo_name, None, [None], None)
    loc = uar.download_location
    assert loc == "git://github.com/justinabrahms/imhotep.git"
Пример #2
0
def test_apply_commit():
    executor = mock.Mock()
    uar = Repository(repo_name, '/loc/', [None], executor)
    uar.apply_commit('base')
    executor.assert_called_with("cd /loc/ && git checkout base")
Пример #3
0
def test_diff_commit():
    executor = mock.Mock()
    uar = Repository(repo_name, '/loc/', [None], executor)
    uar.diff_commit('commit-to-diff')
    executor.assert_called_with("cd /loc/ && git diff commit-to-diff")
Пример #4
0
def test_diff_commit__compare_point_applied():
    executor = mock.Mock()
    uar = Repository(repo_name, '/loc/', [None], executor)
    uar.diff_commit('commit-to-diff', compare_point='base')
    executor.assert_any_call("cd /loc/ && git checkout base")
Пример #5
0
def test_unicode():
    r = Repository(repo_name, None, [None], None)
    assert r.__unicode__() == repo_name