def test_download_directory_git(self):
path = '/'
git_url = 'git://githoobie.com/lol.git<%s><%s>' % (tree_object, path)
await self._do_download(git_url)
self._check_config()
# ensure the sequence of git commands were called
assert self.subprocess.run.mock_calls == [
call(['git', 'clone', '--bare',
'git://githoobie.com/lol.git', '/t/mut/lol.git'],
cwd='/t/mut'),
call(['git', 'rev-parse', '--quiet', '--verify', tree_object],
cwd='/t/mut/lol.git', stdout=-1),
call(['git', 'archive', '--prefix=/t/res/lol.git',
'--format=directory', tree_object],
cwd='/t/mut/lol.git'),
]
评论列表
文章目录