From acb0fa8b94ef421ad60c8507b634759a472cd56c Mon Sep 17 00:00:00 2001 From: Sebastian Thiel Date: Wed, 21 Oct 2009 14:54:59 +0200 Subject: Fixed utils.touch which did not work as the 'time' arg was missing, and even if added the method fails if the file does not exist ( at least on linux ) repo.daemon_export: fixed test for it which still used the daemon_serve property that does not exist --- test/git/test_repo.py | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'test/git/test_repo.py') diff --git a/test/git/test_repo.py b/test/git/test_repo.py index 8927971a..abf17be8 100644 --- a/test/git/test_repo.py +++ b/test/git/test_repo.py @@ -198,14 +198,12 @@ class TestRepo(object): def test_archive_tar_gz(self): self.repo.archive_tar_gz() - @patch('git.utils.touch') - def test_enable_daemon_serve(self, touch): - self.repo.daemon_serve = False - assert_false(self.repo.daemon_serve) - - def test_disable_daemon_serve(self): - self.repo.daemon_serve = True - assert_true(self.repo.daemon_serve) + def test_disable_daemon_export(self): + prev_value = self.repo.daemon_export + self.repo.daemon_export = not prev_value + assert_equal(self.repo.daemon_export, not prev_value) + self.repo.daemon_export = prev_value + assert_equal(self.repo.daemon_export, prev_value) def test_alternates(self): cur_alternates = self.repo.alternates -- cgit v1.2.1