diff options
author | Chris St. Pierre <chris.a.st.pierre@gmail.com> | 2012-08-14 07:53:43 -0400 |
---|---|---|
committer | Chris St. Pierre <chris.a.st.pierre@gmail.com> | 2012-08-14 07:53:43 -0400 |
commit | f8f62180e36ccc846315e309b62d17e732a3148f (patch) | |
tree | f67541041043dd912205286929d825ff511e6a20 /testsuite/Testlib/TestServer/TestPlugins/TestProbes.py | |
parent | 9f27d18c1bc14a570f40a77b0c97373e6ab58431 (diff) | |
download | bcfg2-f8f62180e36ccc846315e309b62d17e732a3148f.tar.gz bcfg2-f8f62180e36ccc846315e309b62d17e732a3148f.tar.bz2 bcfg2-f8f62180e36ccc846315e309b62d17e732a3148f.zip |
fixed test inheritance
Diffstat (limited to 'testsuite/Testlib/TestServer/TestPlugins/TestProbes.py')
-rw-r--r-- | testsuite/Testlib/TestServer/TestPlugins/TestProbes.py | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/testsuite/Testlib/TestServer/TestPlugins/TestProbes.py b/testsuite/Testlib/TestServer/TestPlugins/TestProbes.py index 816f9c370..f90096210 100644 --- a/testsuite/Testlib/TestServer/TestPlugins/TestProbes.py +++ b/testsuite/Testlib/TestServer/TestPlugins/TestProbes.py @@ -74,19 +74,22 @@ class TestProbeData(Bcfg2TestCase): class TestProbeSet(TestEntrySet): - def get_probeset_object(self, fam=None): + test_obj = ProbeSet + + def get_obj(self, path=datastore, fam=None, encoding=None, + plugin_name="Probes"): if fam is None: fam = Mock() - return ProbeSet(datastore, fam, None, "Probes") + return self.test_obj(path, fam, encoding, plugin_name) def test__init(self): fam = Mock() - ps = self.get_probeset_object(fam) + ps = self.get_obj(fam=fam) self.assertEqual(ps.plugin_name, "Probes") fam.AddMonitor.assert_called_with(datastore, ps) def test_HandleEvent(self): - ps = self.get_probeset_object() + ps = self.get_obj() ps.handle_event = Mock() # test that events on the data store itself are skipped @@ -109,7 +112,7 @@ class TestProbeSet(TestEntrySet): @patch("__builtin__.list", FakeList) def test_get_probe_data(self): - ps = self.get_probeset_object() + ps = self.get_obj() # build some fairly complex test data for this. in the end, # we want the probe data to include only the most specific @@ -170,6 +173,8 @@ group-specific""" class TestProbes(TestProbing, TestConnector, TestDatabaseBacked): + test_obj = Probes + def get_test_probedata(self): test_xdata = lxml.etree.Element("test") lxml.etree.SubElement(test_xdata, "test", foo="foo") |