summaryrefslogtreecommitdiffstats
path: root/testsuite
diff options
context:
space:
mode:
authorChris St. Pierre <chris.a.st.pierre@gmail.com>2012-11-19 13:01:59 -0500
committerChris St. Pierre <chris.a.st.pierre@gmail.com>2012-11-19 13:21:16 -0500
commit8399ec79ec9c286f7371e203a3cafe52cf574ace (patch)
tree31cad59233e9799eaa075d09c2b4585dd873506e /testsuite
parent255046b3f3484219bbfa6646c88bbc4bbc1b5256 (diff)
downloadbcfg2-8399ec79ec9c286f7371e203a3cafe52cf574ace.tar.gz
bcfg2-8399ec79ec9c286f7371e203a3cafe52cf574ace.tar.bz2
bcfg2-8399ec79ec9c286f7371e203a3cafe52cf574ace.zip
fixed vcs_root/vcs_path for Version plugins, esp. Svn
Diffstat (limited to 'testsuite')
-rw-r--r--testsuite/Testsrc/Testlib/TestServer/TestPlugin/Testbase.py2
-rw-r--r--testsuite/Testsrc/Testlib/TestServer/TestPlugin/Testinterfaces.py9
2 files changed, 7 insertions, 4 deletions
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):