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/TestClient | |
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/TestClient')
8 files changed, 10 insertions, 25 deletions
diff --git a/testsuite/Testsrc/Testlib/TestClient/TestTools/TestPOSIX/TestDevice.py b/testsuite/Testsrc/Testlib/TestClient/TestTools/TestPOSIX/TestDevice.py index a18327fe0..9f396b0b6 100644 --- a/testsuite/Testsrc/Testlib/TestClient/TestTools/TestPOSIX/TestDevice.py +++ b/testsuite/Testsrc/Testlib/TestClient/TestTools/TestPOSIX/TestDevice.py @@ -16,9 +16,7 @@ while path != "/": path = os.path.dirname(path) from Test__init import get_posix_object from Testbase import TestPOSIXTool -from common import XI_NAMESPACE, XI, inPy3k, call, builtins, u, can_skip, \ - skip, skipIf, skipUnless, Bcfg2TestCase, DBModelTestCase, syncdb, \ - patchIf, datastore +from common import * class TestPOSIXDevice(TestPOSIXTool): test_obj = POSIXDevice diff --git a/testsuite/Testsrc/Testlib/TestClient/TestTools/TestPOSIX/TestDirectory.py b/testsuite/Testsrc/Testlib/TestClient/TestTools/TestPOSIX/TestDirectory.py index e01bd7453..1ce6562c5 100644 --- a/testsuite/Testsrc/Testlib/TestClient/TestTools/TestPOSIX/TestDirectory.py +++ b/testsuite/Testsrc/Testlib/TestClient/TestTools/TestPOSIX/TestDirectory.py @@ -17,9 +17,7 @@ while path != "/": path = os.path.dirname(path) from Test__init import get_posix_object from Testbase import TestPOSIXTool -from common import XI_NAMESPACE, XI, inPy3k, call, builtins, u, can_skip, \ - skip, skipIf, skipUnless, Bcfg2TestCase, DBModelTestCase, syncdb, \ - patchIf, datastore +from common import * class TestPOSIXDirectory(TestPOSIXTool): test_obj = POSIXDirectory diff --git a/testsuite/Testsrc/Testlib/TestClient/TestTools/TestPOSIX/TestFile.py b/testsuite/Testsrc/Testlib/TestClient/TestTools/TestPOSIX/TestFile.py index cdf11ce5e..f69c33a97 100644 --- a/testsuite/Testsrc/Testlib/TestClient/TestTools/TestPOSIX/TestFile.py +++ b/testsuite/Testsrc/Testlib/TestClient/TestTools/TestPOSIX/TestFile.py @@ -20,9 +20,7 @@ while path != "/": path = os.path.dirname(path) from Test__init import get_posix_object from Testbase import TestPOSIXTool -from common import XI_NAMESPACE, XI, inPy3k, call, builtins, u, can_skip, \ - skip, skipIf, skipUnless, Bcfg2TestCase, DBModelTestCase, syncdb, \ - patchIf, datastore +from common import * def get_file_object(posix=None): if posix is None: diff --git a/testsuite/Testsrc/Testlib/TestClient/TestTools/TestPOSIX/TestHardlink.py b/testsuite/Testsrc/Testlib/TestClient/TestTools/TestPOSIX/TestHardlink.py index d68e15837..c38e86aeb 100644 --- a/testsuite/Testsrc/Testlib/TestClient/TestTools/TestPOSIX/TestHardlink.py +++ b/testsuite/Testsrc/Testlib/TestClient/TestTools/TestPOSIX/TestHardlink.py @@ -16,9 +16,7 @@ while path != "/": path = os.path.dirname(path) from Test__init import get_posix_object from Testbase import TestPOSIXTool -from common import XI_NAMESPACE, XI, inPy3k, call, builtins, u, can_skip, \ - skip, skipIf, skipUnless, Bcfg2TestCase, DBModelTestCase, syncdb, \ - patchIf, datastore +from common import * class TestPOSIXHardlink(TestPOSIXTool): test_obj = POSIXHardlink diff --git a/testsuite/Testsrc/Testlib/TestClient/TestTools/TestPOSIX/TestNonexistent.py b/testsuite/Testsrc/Testlib/TestClient/TestTools/TestPOSIX/TestNonexistent.py index 375ff00eb..676b18f5d 100644 --- a/testsuite/Testsrc/Testlib/TestClient/TestTools/TestPOSIX/TestNonexistent.py +++ b/testsuite/Testsrc/Testlib/TestClient/TestTools/TestPOSIX/TestNonexistent.py @@ -16,9 +16,7 @@ while path != "/": path = os.path.dirname(path) from Test__init import get_config, get_posix_object from Testbase import TestPOSIXTool -from common import XI_NAMESPACE, XI, inPy3k, call, builtins, u, can_skip, \ - skip, skipIf, skipUnless, Bcfg2TestCase, DBModelTestCase, syncdb, \ - patchIf, datastore +from common import * class TestPOSIXNonexistent(TestPOSIXTool): test_obj = POSIXNonexistent diff --git a/testsuite/Testsrc/Testlib/TestClient/TestTools/TestPOSIX/TestSymlink.py b/testsuite/Testsrc/Testlib/TestClient/TestTools/TestPOSIX/TestSymlink.py index b02f7b3c3..4c8ddfa3f 100644 --- a/testsuite/Testsrc/Testlib/TestClient/TestTools/TestPOSIX/TestSymlink.py +++ b/testsuite/Testsrc/Testlib/TestClient/TestTools/TestPOSIX/TestSymlink.py @@ -16,9 +16,7 @@ while path != "/": path = os.path.dirname(path) from Test__init import get_posix_object from Testbase import TestPOSIXTool -from common import XI_NAMESPACE, XI, inPy3k, call, builtins, u, can_skip, \ - skip, skipIf, skipUnless, Bcfg2TestCase, DBModelTestCase, syncdb, \ - patchIf, datastore +from common import * class TestPOSIXSymlink(TestPOSIXTool): test_obj = POSIXSymlink diff --git a/testsuite/Testsrc/Testlib/TestClient/TestTools/TestPOSIX/Test__init.py b/testsuite/Testsrc/Testlib/TestClient/TestTools/TestPOSIX/Test__init.py index 14a2520df..e503ebd38 100644 --- a/testsuite/Testsrc/Testlib/TestClient/TestTools/TestPOSIX/Test__init.py +++ b/testsuite/Testsrc/Testlib/TestClient/TestTools/TestPOSIX/Test__init.py @@ -14,9 +14,7 @@ while path != "/": if os.path.basename(path) == "testsuite": break path = os.path.dirname(path) -from common import XI_NAMESPACE, XI, inPy3k, call, builtins, u, can_skip, \ - skip, skipIf, skipUnless, Bcfg2TestCase, DBModelTestCase, syncdb, \ - patchIf, datastore +from common import * def get_config(entries): config = lxml.etree.Element("Configuration") diff --git a/testsuite/Testsrc/Testlib/TestClient/TestTools/TestPOSIX/Testbase.py b/testsuite/Testsrc/Testlib/TestClient/TestTools/TestPOSIX/Testbase.py index bcb1d16af..39c0b02d0 100644 --- a/testsuite/Testsrc/Testlib/TestClient/TestTools/TestPOSIX/Testbase.py +++ b/testsuite/Testsrc/Testlib/TestClient/TestTools/TestPOSIX/Testbase.py @@ -17,9 +17,7 @@ while path != "/": break path = os.path.dirname(path) from Test__init import get_posix_object -from common import XI_NAMESPACE, XI, inPy3k, call, builtins, u, can_skip, \ - skip, skipIf, skipUnless, Bcfg2TestCase, DBModelTestCase, syncdb, \ - patchIf, datastore +from common import * try: import selinux @@ -33,6 +31,7 @@ try: except ImportError: HAS_ACLS = False + class TestPOSIXTool(Bcfg2TestCase): test_obj = POSIXTool @@ -52,7 +51,7 @@ class TestPOSIXTool(Bcfg2TestCase): # fully_specified should do no checking on the abstract # POSIXTool object self.assertTrue(self.ptool.fully_specified(Mock())) - + @patch('os.stat') @patch('os.walk') @patch("Bcfg2.Client.Tools.POSIX.base.%s._verify_metadata" % |