diff options
author | Chris St. Pierre <chris.a.st.pierre@gmail.com> | 2012-08-20 17:26:22 -0400 |
---|---|---|
committer | Chris St. Pierre <chris.a.st.pierre@gmail.com> | 2012-08-21 13:33:20 -0400 |
commit | d0efac8fde1f2bfc77b45899073c225201c64a2c (patch) | |
tree | 43e6cc017172b4da3b0145a7a7a3b2270a17c012 /testsuite/Testlib/TestClient | |
parent | 0fd2d233f460fa868a62726c37a30ae06f1b0797 (diff) | |
download | bcfg2-d0efac8fde1f2bfc77b45899073c225201c64a2c.tar.gz bcfg2-d0efac8fde1f2bfc77b45899073c225201c64a2c.tar.bz2 bcfg2-d0efac8fde1f2bfc77b45899073c225201c64a2c.zip |
attempt to get tests working under python 2.6
Diffstat (limited to 'testsuite/Testlib/TestClient')
-rw-r--r-- | testsuite/Testlib/TestClient/TestTools/TestPOSIX/Testbase.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/testsuite/Testlib/TestClient/TestTools/TestPOSIX/Testbase.py b/testsuite/Testlib/TestClient/TestTools/TestPOSIX/Testbase.py index 4fbc2485f..442641c0b 100644 --- a/testsuite/Testlib/TestClient/TestTools/TestPOSIX/Testbase.py +++ b/testsuite/Testlib/TestClient/TestTools/TestPOSIX/Testbase.py @@ -285,7 +285,7 @@ class TestPOSIXTool(Bcfg2TestCase): mock_set_secontext.assert_called_with(entry, path=entry.get("name")) mock_set_acls.assert_called_with(entry, path=entry.get("name")) - @unittest.skipUnless(has_acls, "ACLS not found, skipping") + @skipUnless(has_acls, "ACLS not found, skipping") @patch("Bcfg2.Client.Tools.POSIX.base.%s._norm_uid" % test_obj.__name__) @patch("Bcfg2.Client.Tools.POSIX.base.%s._norm_gid" % test_obj.__name__) @patch("Bcfg2.Client.Tools.POSIX.base.%s._list_entry_acls" % @@ -429,7 +429,7 @@ class TestPOSIXTool(Bcfg2TestCase): self.assertItemsEqual(added_acls, [(fileacl_rv, posix1e.ACL_GROUP, 100, 5)]) - @unittest.skipUnless(has_selinux, "SELinux not found, skipping") + @skipUnless(has_selinux, "SELinux not found, skipping") def test_set_secontext(self): entry = lxml.etree.Element("Path", name="/etc/foo", type="file") ptool = self.get_obj() @@ -577,7 +577,7 @@ class TestPOSIXTool(Bcfg2TestCase): Bcfg2.Client.Tools.POSIX.base.has_acls = states mock_stat.assert_called_with(path) - @unittest.skipUnless(has_selinux, "SELinux not found, skipping") + @skipUnless(has_selinux, "SELinux not found, skipping") def test__gather_data_selinux(self): context = 'system_u:object_r:root_t:s0' path = '/test' @@ -595,7 +595,7 @@ class TestPOSIXTool(Bcfg2TestCase): @patch("Bcfg2.Client.Tools.POSIX.base.%s._list_file_acls" % test_obj.__name__) - @unittest.skipUnless(has_acls, "ACLS not found, skipping") + @skipUnless(has_acls, "ACLS not found, skipping") def test__gather_data_acls(self, mock_list_file_acls): acls = {("default", posix1e.ACL_USER, "testuser"): "rwx", ("access", posix1e.ACL_GROUP, "testgroup"): "rx"} @@ -779,7 +779,7 @@ class TestPOSIXTool(Bcfg2TestCase): self.assertEqual(entry.get(attr), val) self.assertEqual(entry.get("current_mtime"), str(mtime)) - @unittest.skipUnless(has_acls, "ACLS not found, skipping") + @skipUnless(has_acls, "ACLS not found, skipping") def test_list_entry_acls(self): entry = lxml.etree.Element("Path", name="/test", type="file") lxml.etree.SubElement(entry, "ACL", scope="user", type="default", @@ -791,7 +791,7 @@ class TestPOSIXTool(Bcfg2TestCase): {("default", posix1e.ACL_USER, "user"): 7, ("access", posix1e.ACL_GROUP, "group"): 5}) - @unittest.skipUnless(has_acls, "ACLS not found, skipping") + @skipUnless(has_acls, "ACLS not found, skipping") @patch("pwd.getpwuid") @patch("grp.getgrgid") def test_list_file_acls(self, mock_getgrgid, mock_getpwuid): @@ -876,7 +876,7 @@ class TestPOSIXTool(Bcfg2TestCase): self.assertItemsEqual(mock_ACL.call_args_list, [call(file=path), call(filedef=path)]) - @unittest.skipUnless(has_acls, "ACLS not found, skipping") + @skipUnless(has_acls, "ACLS not found, skipping") @patch("Bcfg2.Client.Tools.POSIX.base.%s._list_file_acls" % test_obj.__name__) @patch("Bcfg2.Client.Tools.POSIX.base.%s._list_entry_acls" % |