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)