diff options
author | Sebastian Thiel <byronimo@gmail.com> | 2009-10-11 20:21:22 +0200 |
---|---|---|
committer | Sebastian Thiel <byronimo@gmail.com> | 2009-10-11 20:21:22 +0200 |
commit | 9a119924bd314934158515a1a5f5877be63f6f91 (patch) | |
tree | 927fbe62fe20c62eedf7beed91ac80b10dc60774 /test/git/test_head.py | |
parent | 15b9129ec639112e94ea96b6a395ad9b149515d1 (diff) | |
download | gitpython-9a119924bd314934158515a1a5f5877be63f6f91.tar.gz |
fixed issue in Ref.name implementation which would not handle components properly
Diffstat (limited to 'test/git/test_head.py')
-rw-r--r-- | test/git/test_head.py | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/test/git/test_head.py b/test/git/test_head.py index 8338552f..b8380838 100644 --- a/test/git/test_head.py +++ b/test/git/test_head.py @@ -11,16 +11,11 @@ class TestHead(object): def setup(self): self.repo = Repo(GIT_REPO) - @patch_object(Git, '_call_process') - def test_repr(self, git): - git.return_value = fixture('for_each_ref') - - head = self.repo.heads[0] - - assert_equal('<git.Head "%s">' % head.name, repr(head)) - - assert_true(git.called) - assert_equal(git.call_args, (('for_each_ref', 'refs/heads'), {'sort': 'committerdate', 'format': '%(refname)%00%(objectname)'})) + def test_base(self): + for head in self.repo.heads: + assert head.name + assert "refs/heads" in head.path + # END for each head @patch_object(Git, '_call_process') def test_ref_with_path_component(self, git): @@ -29,4 +24,3 @@ class TestHead(object): assert_equal('refactoring/feature1', head.name) assert_true(git.called) - assert_equal(git.call_args, (('for_each_ref', 'refs/heads'), {'sort': 'committerdate', 'format': '%(refname)%00%(objectname)'})) |