summaryrefslogtreecommitdiff
path: root/test/git/test_repo.py
diff options
context:
space:
mode:
authorSebastian Thiel <byronimo@gmail.com>2009-10-11 21:17:59 +0200
committerSebastian Thiel <byronimo@gmail.com>2009-10-11 21:17:59 +0200
commit708b8dda8e7b87841a5f39c60b799c514e75a9c7 (patch)
tree0726d95c0ad6270278c6695381522e8a5f8a2b76 /test/git/test_repo.py
parentccde80b7a3037a004a7807a6b79916ce2a1e9729 (diff)
downloadgitpython-708b8dda8e7b87841a5f39c60b799c514e75a9c7.tar.gz
commit: fixed failing commit tests as the mocked git command would always return the same thing which does not work anymore - re-implemented it in a more dynamic manner, but in the end tests will have to be revised anyway
Added slots to Diff and Stats type respectively
Diffstat (limited to 'test/git/test_repo.py')
-rw-r--r--test/git/test_repo.py15
1 files changed, 5 insertions, 10 deletions
diff --git a/test/git/test_repo.py b/test/git/test_repo.py
index e232b065..d4316981 100644
--- a/test/git/test_repo.py
+++ b/test/git/test_repo.py
@@ -33,16 +33,11 @@ class TestRepo(object):
for head in self.repo.heads:
assert_equal(Head, head.__class__)
- @patch_object(Git, '_call_process')
- def test_heads_should_populate_head_data(self, git):
- git.return_value = fixture('for_each_ref')
-
- head = self.repo.heads[0]
- assert_equal('master', head.name)
- assert_equal('634396b2f541a9f2d58b00be1a07f0c358b999b3', head.commit.id)
-
- assert_true(git.called)
- assert_equal(git.call_args, (('for_each_ref', 'refs/heads'), {'sort': 'committerdate', 'format': '%(refname)%00%(objectname)'}))
+ def test_heads_should_populate_head_data(self):
+ for head in self.repo.heads:
+ assert head.name
+ assert isinstance(head.commit,Commit)
+ # END for each head
@patch_object(Git, '_call_process')
def test_commits(self, git):