diff options
author | Michael Trier <mtrier@gmail.com> | 2008-09-14 10:43:41 -0400 |
---|---|---|
committer | Michael Trier <mtrier@gmail.com> | 2008-09-14 10:43:41 -0400 |
commit | 5613079f2494808f048b81815bf708debf7339d2 (patch) | |
tree | bd1af57549b98d7c8b28cc1a867df75bfd542044 /test/git/test_repo.py | |
parent | 3131d1a5295508f583ae22788a1065144bec3cee (diff) | |
parent | a2856af1d9289ee086b10768b53b65e0fd13a335 (diff) | |
download | gitpython-5613079f2494808f048b81815bf708debf7339d2.tar.gz |
Merge branch 'master' of git://gitorious.org/git-python/nud
Diffstat (limited to 'test/git/test_repo.py')
-rw-r--r-- | test/git/test_repo.py | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/test/git/test_repo.py b/test/git/test_repo.py index 7550e1d6..29ba463b 100644 --- a/test/git/test_repo.py +++ b/test/git/test_repo.py @@ -25,7 +25,9 @@ class TestRepo(object): Repo("repos/foobar") def test_description(self): - assert_equal("Unnamed repository; edit this file to name it for gitweb.", self.repo.description) + txt = "Test repository" + self.repo.description = txt + assert_equal(self.repo.description, txt) def test_heads_should_return_array_of_head_objects(self): for head in self.repo.heads: @@ -96,8 +98,8 @@ class TestRepo(object): tree = self.repo.tree('master') - assert_equal(4, len([c for c in tree.contents if isinstance(c, Blob)])) - assert_equal(3, len([c for c in tree.contents if isinstance(c, Tree)])) + assert_equal(4, len([c for c in tree.values() if isinstance(c, Blob)])) + assert_equal(3, len([c for c in tree.values() if isinstance(c, Tree)])) assert_true(git.called) assert_equal(git.call_args, (('ls_tree', 'master'), {})) @@ -194,10 +196,12 @@ class TestRepo(object): @patch('git.utils', 'touch') def test_enable_daemon_serve(self, touch): - self.repo.enable_daemon_serve + self.repo.daemon_serve = False + assert_false(self.repo.daemon_serve) def test_disable_daemon_serve(self): - self.repo.disable_daemon_serve + self.repo.daemon_serve = True + assert_true(self.repo.daemon_serve) # @patch(os.path, 'exists') # @patch('__builtin__', 'open') |