-
-
Notifications
You must be signed in to change notification settings - Fork 386
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Repository: allow retrieving the default signature
Make it easier to grab the default signature for a repository by adding a getter at the Repository level.
- Loading branch information
Showing
2 changed files
with
25 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -371,6 +371,16 @@ def test_merge_already_something_in_index(self): | |
self.repo.index.add('inindex.txt') | ||
self.assertRaises(pygit2.GitError, self.repo.merge, branch_oid) | ||
|
||
class RepositorySignatureTest(utils.RepoTestCase): | ||
|
||
def test_default_signature(self): | ||
config = self.repo.config | ||
config['user.name'] = 'Random J Hacker' | ||
config['user.email'] ='[email protected]' | ||
|
||
sig = self.repo.default_signature | ||
self.assertEqual('Random J Hacker', sig.name) | ||
self.assertEqual('[email protected]', sig.email) | ||
|
||
class NewRepositoryTest(utils.NoRepoTestCase): | ||
|
||
|