From 1a3ced3f45423d79e08ca7d861e8118e8618d3b2 Mon Sep 17 00:00:00 2001 From: "Chris St. Pierre" Date: Fri, 5 Oct 2012 11:57:16 -0400 Subject: wrote more detailed unit testing documentation --- .../Testsrc/Testlib/TestClient/TestTools/TestPOSIX/TestDevice.py | 4 +--- .../Testlib/TestClient/TestTools/TestPOSIX/TestDirectory.py | 4 +--- .../Testsrc/Testlib/TestClient/TestTools/TestPOSIX/TestFile.py | 4 +--- .../Testsrc/Testlib/TestClient/TestTools/TestPOSIX/TestHardlink.py | 4 +--- .../Testlib/TestClient/TestTools/TestPOSIX/TestNonexistent.py | 4 +--- .../Testsrc/Testlib/TestClient/TestTools/TestPOSIX/TestSymlink.py | 4 +--- .../Testsrc/Testlib/TestClient/TestTools/TestPOSIX/Test__init.py | 4 +--- .../Testsrc/Testlib/TestClient/TestTools/TestPOSIX/Testbase.py | 7 +++---- 8 files changed, 10 insertions(+), 25 deletions(-) (limited to 'testsuite/Testsrc/Testlib/TestClient') 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" % -- cgit v1.2.3-1-g7c22