示例#1
0
def test_generate_commit_info():
    repo, remote = repo_from_url(REMOTE_REPO_HTTPS)

    refs = repo.listall_references()
    ref = repo.lookup_reference(refs[0])
    commit = repo[ref.target]
    commit_info = generate_commit_info(commit)

    assert commit_info['author-name'] == "Ana Nelson"
    assert commit_info['author-email'] == "*****@*****.**"
示例#2
0
def test_repo_from_url():
    repo, remote = repo_from_url(REMOTE_REPO_HTTPS)
    assert remote.name == 'origin'
    assert remote.url == REMOTE_REPO_HTTPS