summaryrefslogtreecommitdiffstats
path: root/testsuite
diff options
context:
space:
mode:
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):