diff options
author | Chris St. Pierre <chris.a.st.pierre@gmail.com> | 2012-10-05 11:57:16 -0400 |
---|---|---|
committer | Chris St. Pierre <chris.a.st.pierre@gmail.com> | 2012-10-05 11:57:16 -0400 |
commit | 1a3ced3f45423d79e08ca7d861e8118e8618d3b2 (patch) | |
tree | 72dcb775987fff65471b6e27bc2c6313d8fcb409 /testsuite/Testsrc/Testlib/TestServer/TestPlugin | |
parent | cc2e101cd6a1ef8c29ef2481c03274011f321a77 (diff) | |
download | bcfg2-1a3ced3f45423d79e08ca7d861e8118e8618d3b2.tar.gz bcfg2-1a3ced3f45423d79e08ca7d861e8118e8618d3b2.tar.bz2 bcfg2-1a3ced3f45423d79e08ca7d861e8118e8618d3b2.zip |
wrote more detailed unit testing documentation
Diffstat (limited to 'testsuite/Testsrc/Testlib/TestServer/TestPlugin')
4 files changed, 7 insertions, 9 deletions
diff --git a/testsuite/Testsrc/Testlib/TestServer/TestPlugin/Testbase.py b/testsuite/Testsrc/Testlib/TestServer/TestPlugin/Testbase.py index 4b2f1981f..7ee3697bb 100644 --- a/testsuite/Testsrc/Testlib/TestServer/TestPlugin/Testbase.py +++ b/testsuite/Testsrc/Testlib/TestServer/TestPlugin/Testbase.py @@ -13,8 +13,7 @@ while path != '/': if os.path.basename(path) == "testsuite": break path = os.path.dirname(path) -from common import call, builtins, skip, skipIf, skipUnless, Bcfg2TestCase, \ - patchIf, datastore +from common import * class TestDebuggable(Bcfg2TestCase): diff --git a/testsuite/Testsrc/Testlib/TestServer/TestPlugin/Testexceptions.py b/testsuite/Testsrc/Testlib/TestServer/TestPlugin/Testexceptions.py index d2b72251e..916ce822d 100644 --- a/testsuite/Testsrc/Testlib/TestServer/TestPlugin/Testexceptions.py +++ b/testsuite/Testsrc/Testlib/TestServer/TestPlugin/Testexceptions.py @@ -12,8 +12,7 @@ while path != '/': if os.path.basename(path) == "testsuite": break path = os.path.dirname(path) -from common import call, builtins, skip, skipIf, skipUnless, Bcfg2TestCase, \ - patchIf, datastore +from common import * class TestPluginInitError(Bcfg2TestCase): diff --git a/testsuite/Testsrc/Testlib/TestServer/TestPlugin/Testhelpers.py b/testsuite/Testsrc/Testlib/TestServer/TestPlugin/Testhelpers.py index 27d726fbb..8a1d5a949 100644 --- a/testsuite/Testsrc/Testlib/TestServer/TestPlugin/Testhelpers.py +++ b/testsuite/Testsrc/Testlib/TestServer/TestPlugin/Testhelpers.py @@ -17,11 +17,11 @@ while path != '/': if os.path.basename(path) == "testsuite": break path = os.path.dirname(path) -from common import XI_NAMESPACE, XI, call, builtins, skip, skipIf, \ - skipUnless, Bcfg2TestCase, patchIf, datastore, inPy3k, can_skip, re_type +from common import * from TestServer.TestPlugin.Testbase import TestPlugin, TestDebuggable from TestServer.TestPlugin.Testinterfaces import TestGenerator + def tostring(el): return lxml.etree.tostring(el, xml_declaration=False).decode('UTF-8') @@ -155,12 +155,13 @@ class TestDirectoryBacked(Bcfg2TestCase): # such thing as a bad event def test_child_interface(self): - # ensure that the child object has the correct interface + """ ensure that the child object has the correct interface """ self.assertTrue(hasattr(self.test_obj.__child__, "HandleEvent")) def get_obj(self, fam=None): if fam is None: fam = Mock() + @patch("%s.%s.add_directory_monitor" % (self.test_obj.__module__, self.test_obj.__name__), Mock()) diff --git a/testsuite/Testsrc/Testlib/TestServer/TestPlugin/Testinterfaces.py b/testsuite/Testsrc/Testlib/TestServer/TestPlugin/Testinterfaces.py index 6ef40d385..ace509057 100644 --- a/testsuite/Testsrc/Testlib/TestServer/TestPlugin/Testinterfaces.py +++ b/testsuite/Testsrc/Testlib/TestServer/TestPlugin/Testinterfaces.py @@ -14,8 +14,7 @@ while path != '/': if os.path.basename(path) == "testsuite": break path = os.path.dirname(path) -from common import call, builtins, skip, skipIf, skipUnless, Bcfg2TestCase, \ - patchIf, datastore +from common import * from TestServer.TestPlugin.Testbase import TestPlugin |