def test_get_credential(self):
     with TempDir() as tmp:
         repo = Repo.init_bare(path(tmp) / 'repo.git')
         repo.git.config('github.user', 'damien')
         repo.git.config('github.token', 'xyz')
         c = Credentials.get_credentials(repo)
         eq_('damien', c.user)
         eq_('xyz', c.token)
Exemple #2
0
 def test_get_credential(self):
     with TempDir() as tmp:
         repo = Repo.init_bare(path(tmp) / 'repo.git')
         repo.git.config('github.user', 'damien')
         repo.git.config('github.token', 'xyz')
         c = Credentials.get_credentials(repo)
         eq_('damien', c.user)
         eq_('xyz', c.token)