From 8399ec79ec9c286f7371e203a3cafe52cf574ace Mon Sep 17 00:00:00 2001 From: "Chris St. Pierre" Date: Mon, 19 Nov 2012 13:01:59 -0500 Subject: fixed vcs_root/vcs_path for Version plugins, esp. Svn --- testsuite/Testsrc/Testlib/TestServer/TestPlugin/Testbase.py | 2 ++ .../Testsrc/Testlib/TestServer/TestPlugin/Testinterfaces.py | 9 +++++---- 2 files changed, 7 insertions(+), 4 deletions(-) (limited to 'testsuite') diff --git a/testsuite/Testsrc/Testlib/TestServer/TestPlugin/Testbase.py b/testsuite/Testsrc/Testlib/TestServer/TestPlugin/Testbase.py index 2eda38cdc..a1e624824 100644 --- a/testsuite/Testsrc/Testlib/TestServer/TestPlugin/Testbase.py +++ b/testsuite/Testsrc/Testlib/TestServer/TestPlugin/Testbase.py @@ -71,10 +71,12 @@ class TestPlugin(TestDebuggable): def get_obj(self, core=None): if core is None: core = Mock() + core.setup = MagicMock() return self.test_obj(core, datastore) def test__init(self): core = Mock() + core.setup = MagicMock() p = self.get_obj(core=core) self.assertEqual(p.data, os.path.join(datastore, p.name)) self.assertEqual(p.core, core) diff --git a/testsuite/Testsrc/Testlib/TestServer/TestPlugin/Testinterfaces.py b/testsuite/Testsrc/Testlib/TestServer/TestPlugin/Testinterfaces.py index 9a064663e..1a7a0a6f7 100644 --- a/testsuite/Testsrc/Testlib/TestServer/TestPlugin/Testinterfaces.py +++ b/testsuite/Testsrc/Testlib/TestServer/TestPlugin/Testinterfaces.py @@ -157,7 +157,7 @@ class TestThreadedStatistics(TestStatistics): # verify this call in an ugly way self.assertItemsEqual(mock_dump.call_args[0][0], self.data) self.assertEqual(mock_dump.call_args[0][1], mock_open.return_value) - + @patch("os.unlink") @patch("os.path.exists") @patch("%s.open" % builtins) @@ -169,7 +169,7 @@ class TestThreadedStatistics(TestStatistics): core = Mock() core.terminate.isSet.return_value = False ts = self.get_obj(core) - + ts.work_queue = Mock() ts.work_queue.data = [] def reset(): @@ -279,7 +279,7 @@ class TestThreadedStatistics(TestStatistics): ts = self.get_obj() self.assertRaises(NotImplementedError, ts.handle_statistic, None, None) - + class TestPullSource(Bcfg2TestCase): def test_GetCurrentEntry(self): @@ -302,7 +302,7 @@ class TestPullTarget(Bcfg2TestCase): class TestDecision(Bcfg2TestCase): test_obj = Decision - + def get_obj(self): return self.test_obj() @@ -332,6 +332,7 @@ class TestVersion(TestPlugin): def get_obj(self, core=None): if core is None: core = Mock() + core.setup = MagicMock() return self.test_obj(core, datastore) def test_get_revision(self): -- cgit v1.2.3-1-g7c22