summaryrefslogtreecommitdiffstats
path: root/testsuite/Testsrc/Testlib/TestServer/TestPlugin/Testinterfaces.py
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/Testsrc/Testlib/TestServer/TestPlugin/Testinterfaces.py')
-rw-r--r--testsuite/Testsrc/Testlib/TestServer/TestPlugin/Testinterfaces.py23
1 files changed, 19 insertions, 4 deletions
diff --git a/testsuite/Testsrc/Testlib/TestServer/TestPlugin/Testinterfaces.py b/testsuite/Testsrc/Testlib/TestServer/TestPlugin/Testinterfaces.py
index 1a7a0a6f7..343f088b3 100644
--- a/testsuite/Testsrc/Testlib/TestServer/TestPlugin/Testinterfaces.py
+++ b/testsuite/Testsrc/Testlib/TestServer/TestPlugin/Testinterfaces.py
@@ -108,15 +108,30 @@ class TestStatistics(TestPlugin):
s.process_statistics, None, None)
-class TestThreadedStatistics(TestStatistics):
+class TestThreaded(Bcfg2TestCase):
+ test_obj = Threaded
+
+ def get_obj(self):
+ return self.test_obj()
+
+ def test_start_threads(self):
+ s = self.get_obj()
+ self.assertRaises(NotImplementedError,
+ s.start_threads)
+
+
+class TestThreadedStatistics(TestStatistics, TestThreaded):
test_obj = ThreadedStatistics
data = [("foo.example.com", "<foo/>"),
("bar.example.com", "<bar/>")]
+ def get_obj(self, core=None):
+ return TestStatistics.get_obj(self, core=core)
+
@patch("threading.Thread.start")
- def test__init(self, mock_start):
- core = Mock()
- ts = self.get_obj(core)
+ def test_start_threads(self, mock_start):
+ ts = self.get_obj()
+ ts.start_threads()
mock_start.assert_any_call()
@patch("%s.open" % builtins)