From 2b898c094a88f99e987f48a7d116d4a6009b456c Mon Sep 17 00:00:00 2001 From: "Chris St. Pierre" Date: Wed, 22 Aug 2012 15:15:43 -0400 Subject: tweaked tests for python 2.5 --- testsuite/Testlib/TestClient/TestTools/TestPOSIX/TestDevice.py | 4 +++- testsuite/Testlib/TestClient/TestTools/TestPOSIX/TestDirectory.py | 4 +++- testsuite/Testlib/TestClient/TestTools/TestPOSIX/TestFile.py | 4 +++- testsuite/Testlib/TestClient/TestTools/TestPOSIX/TestHardlink.py | 4 +++- testsuite/Testlib/TestClient/TestTools/TestPOSIX/TestNonexistent.py | 4 +++- testsuite/Testlib/TestClient/TestTools/TestPOSIX/TestSymlink.py | 4 +++- testsuite/Testlib/TestClient/TestTools/TestPOSIX/Test__init.py | 4 +++- testsuite/Testlib/TestClient/TestTools/TestPOSIX/Testbase.py | 4 +++- testsuite/Testlib/TestOptions.py | 4 +++- testsuite/Testlib/TestServer/TestPlugin.py | 4 +++- testsuite/Testlib/TestServer/TestPlugins/TestMetadata.py | 4 +++- testsuite/Testlib/TestServer/TestPlugins/TestProbes.py | 4 +++- 12 files changed, 36 insertions(+), 12 deletions(-) (limited to 'testsuite/Testlib') diff --git a/testsuite/Testlib/TestClient/TestTools/TestPOSIX/TestDevice.py b/testsuite/Testlib/TestClient/TestTools/TestPOSIX/TestDevice.py index 2a935fcbc..5b0d0eff0 100644 --- a/testsuite/Testlib/TestClient/TestTools/TestPOSIX/TestDevice.py +++ b/testsuite/Testlib/TestClient/TestTools/TestPOSIX/TestDevice.py @@ -5,7 +5,9 @@ from mock import Mock, MagicMock, patch from Bcfg2.Client.Tools.POSIX.Device import * from .Test__init import get_posix_object from .Testbase import TestPOSIXTool -from .....common import * +# python 2.5 can't import * from relative imports +from .....common import XI_NAMESPACE, XI, inPy3k, call, builtins, u, can_skip, \ + skip, skipIf, skipUnless, Bcfg2TestCase, DBModelTestCase, syncdb, patchIf class TestPOSIXDevice(TestPOSIXTool): test_obj = POSIXDevice diff --git a/testsuite/Testlib/TestClient/TestTools/TestPOSIX/TestDirectory.py b/testsuite/Testlib/TestClient/TestTools/TestPOSIX/TestDirectory.py index 34d47d8d3..0cf8cda93 100644 --- a/testsuite/Testlib/TestClient/TestTools/TestPOSIX/TestDirectory.py +++ b/testsuite/Testlib/TestClient/TestTools/TestPOSIX/TestDirectory.py @@ -6,7 +6,9 @@ from mock import Mock, MagicMock, patch from Bcfg2.Client.Tools.POSIX.Directory import * from .Test__init import get_posix_object from .Testbase import TestPOSIXTool -from .....common import * +# python 2.5 can't import * from relative imports +from .....common import XI_NAMESPACE, XI, inPy3k, call, builtins, u, can_skip, \ + skip, skipIf, skipUnless, Bcfg2TestCase, DBModelTestCase, syncdb, patchIf class TestPOSIXDirectory(TestPOSIXTool): test_obj = POSIXDirectory diff --git a/testsuite/Testlib/TestClient/TestTools/TestPOSIX/TestFile.py b/testsuite/Testlib/TestClient/TestTools/TestPOSIX/TestFile.py index 66b5b44ad..c168c38e7 100644 --- a/testsuite/Testlib/TestClient/TestTools/TestPOSIX/TestFile.py +++ b/testsuite/Testlib/TestClient/TestTools/TestPOSIX/TestFile.py @@ -9,7 +9,9 @@ from mock import Mock, MagicMock, patch from Bcfg2.Client.Tools.POSIX.File import * from .Test__init import get_posix_object from .Testbase import TestPOSIXTool -from .....common import * +# python 2.5 can't import * from relative imports +from .....common import XI_NAMESPACE, XI, inPy3k, call, builtins, u, can_skip, \ + skip, skipIf, skipUnless, Bcfg2TestCase, DBModelTestCase, syncdb, patchIf def get_file_object(posix=None): if posix is None: diff --git a/testsuite/Testlib/TestClient/TestTools/TestPOSIX/TestHardlink.py b/testsuite/Testlib/TestClient/TestTools/TestPOSIX/TestHardlink.py index ae48bf04e..6221bd81c 100644 --- a/testsuite/Testlib/TestClient/TestTools/TestPOSIX/TestHardlink.py +++ b/testsuite/Testlib/TestClient/TestTools/TestPOSIX/TestHardlink.py @@ -5,7 +5,9 @@ from mock import Mock, MagicMock, patch from Bcfg2.Client.Tools.POSIX.Hardlink import * from .Test__init import get_posix_object from .Testbase import TestPOSIXTool -from .....common import * +# python 2.5 can't import * from relative imports +from .....common import XI_NAMESPACE, XI, inPy3k, call, builtins, u, can_skip, \ + skip, skipIf, skipUnless, Bcfg2TestCase, DBModelTestCase, syncdb, patchIf class TestPOSIXHardlink(TestPOSIXTool): test_obj = POSIXHardlink diff --git a/testsuite/Testlib/TestClient/TestTools/TestPOSIX/TestNonexistent.py b/testsuite/Testlib/TestClient/TestTools/TestPOSIX/TestNonexistent.py index fbd9a11ad..592a108b9 100644 --- a/testsuite/Testlib/TestClient/TestTools/TestPOSIX/TestNonexistent.py +++ b/testsuite/Testlib/TestClient/TestTools/TestPOSIX/TestNonexistent.py @@ -5,7 +5,9 @@ from mock import Mock, MagicMock, patch from Bcfg2.Client.Tools.POSIX.Nonexistent import * from .Test__init import get_config, get_posix_object from .Testbase import TestPOSIXTool -from .....common import * +# python 2.5 can't import * from relative imports +from .....common import XI_NAMESPACE, XI, inPy3k, call, builtins, u, can_skip, \ + skip, skipIf, skipUnless, Bcfg2TestCase, DBModelTestCase, syncdb, patchIf class TestPOSIXNonexistent(TestPOSIXTool): test_obj = POSIXNonexistent diff --git a/testsuite/Testlib/TestClient/TestTools/TestPOSIX/TestSymlink.py b/testsuite/Testlib/TestClient/TestTools/TestPOSIX/TestSymlink.py index 2cd10f243..d1d470b18 100644 --- a/testsuite/Testlib/TestClient/TestTools/TestPOSIX/TestSymlink.py +++ b/testsuite/Testlib/TestClient/TestTools/TestPOSIX/TestSymlink.py @@ -5,7 +5,9 @@ from mock import Mock, MagicMock, patch from Bcfg2.Client.Tools.POSIX.Symlink import * from .Test__init import get_posix_object from .Testbase import TestPOSIXTool -from .....common import * +# python 2.5 can't import * from relative imports +from .....common import XI_NAMESPACE, XI, inPy3k, call, builtins, u, can_skip, \ + skip, skipIf, skipUnless, Bcfg2TestCase, DBModelTestCase, syncdb, patchIf class TestPOSIXSymlink(TestPOSIXTool): test_obj = POSIXSymlink diff --git a/testsuite/Testlib/TestClient/TestTools/TestPOSIX/Test__init.py b/testsuite/Testlib/TestClient/TestTools/TestPOSIX/Test__init.py index 20577a6da..f4e736678 100644 --- a/testsuite/Testlib/TestClient/TestTools/TestPOSIX/Test__init.py +++ b/testsuite/Testlib/TestClient/TestTools/TestPOSIX/Test__init.py @@ -3,7 +3,9 @@ import lxml.etree from mock import Mock, MagicMock, patch import Bcfg2.Client.Tools import Bcfg2.Client.Tools.POSIX -from .....common import * +# python 2.5 can't import * from relative imports +from .....common import XI_NAMESPACE, XI, inPy3k, call, builtins, u, can_skip, \ + skip, skipIf, skipUnless, Bcfg2TestCase, DBModelTestCase, syncdb, patchIf def get_config(entries): config = lxml.etree.Element("Configuration") diff --git a/testsuite/Testlib/TestClient/TestTools/TestPOSIX/Testbase.py b/testsuite/Testlib/TestClient/TestTools/TestPOSIX/Testbase.py index 65b92f75f..5d96a61d7 100644 --- a/testsuite/Testlib/TestClient/TestTools/TestPOSIX/Testbase.py +++ b/testsuite/Testlib/TestClient/TestTools/TestPOSIX/Testbase.py @@ -6,7 +6,9 @@ from mock import Mock, MagicMock, patch import Bcfg2.Client.Tools from Bcfg2.Client.Tools.POSIX.base import * from .Test__init import get_posix_object -from .....common import * +# python 2.5 can't import * from relative imports +from .....common import XI_NAMESPACE, XI, inPy3k, call, builtins, u, can_skip, \ + skip, skipIf, skipUnless, Bcfg2TestCase, DBModelTestCase, syncdb, patchIf try: import selinux diff --git a/testsuite/Testlib/TestOptions.py b/testsuite/Testlib/TestOptions.py index e49fe6a25..102ef5166 100644 --- a/testsuite/Testlib/TestOptions.py +++ b/testsuite/Testlib/TestOptions.py @@ -2,7 +2,9 @@ import os import sys from mock import Mock, MagicMock, patch from Bcfg2.Options import * -from ..common import * +# python 2.5 can't import * from relative imports +from ..common import XI_NAMESPACE, XI, inPy3k, call, builtins, u, can_skip, \ + skip, skipIf, skipUnless, Bcfg2TestCase, DBModelTestCase, syncdb, patchIf # Compatibility imports from Bcfg2.Bcfg2Py3k import ConfigParser diff --git a/testsuite/Testlib/TestServer/TestPlugin.py b/testsuite/Testlib/TestServer/TestPlugin.py index d0e840999..64cde987e 100644 --- a/testsuite/Testlib/TestServer/TestPlugin.py +++ b/testsuite/Testlib/TestServer/TestPlugin.py @@ -8,7 +8,9 @@ import Bcfg2.Server from Bcfg2.Bcfg2Py3k import reduce from mock import Mock, MagicMock, patch from Bcfg2.Server.Plugin import * -from ...common import * +# python 2.5 can't import * from relative imports +from ...common import XI_NAMESPACE, XI, inPy3k, call, builtins, u, can_skip, \ + skip, skipIf, skipUnless, Bcfg2TestCase, DBModelTestCase, syncdb, patchIf def tostring(el): return lxml.etree.tostring(el, xml_declaration=False).decode('UTF-8') diff --git a/testsuite/Testlib/TestServer/TestPlugins/TestMetadata.py b/testsuite/Testlib/TestServer/TestPlugins/TestMetadata.py index 3eae8fe6b..29c17a320 100644 --- a/testsuite/Testlib/TestServer/TestPlugins/TestMetadata.py +++ b/testsuite/Testlib/TestServer/TestPlugins/TestMetadata.py @@ -5,7 +5,9 @@ import time import socket import lxml.etree from mock import Mock, patch -from ....common import * +# python 2.5 can't import * from relative imports +from ....common import XI_NAMESPACE, XI, inPy3k, call, builtins, u, can_skip, \ + skip, skipIf, skipUnless, Bcfg2TestCase, DBModelTestCase, syncdb, patchIf import Bcfg2.Server import Bcfg2.Server.Plugin from Bcfg2.Server.Plugins.Metadata import * diff --git a/testsuite/Testlib/TestServer/TestPlugins/TestProbes.py b/testsuite/Testlib/TestServer/TestPlugins/TestProbes.py index 1bee16d59..cd489d5f0 100644 --- a/testsuite/Testlib/TestServer/TestPlugins/TestProbes.py +++ b/testsuite/Testlib/TestServer/TestPlugins/TestProbes.py @@ -3,7 +3,9 @@ import sys import time import lxml.etree from mock import Mock, MagicMock, patch -from ....common import * +# python 2.5 can't import * from relative imports +from ....common import XI_NAMESPACE, XI, inPy3k, call, builtins, u, can_skip, \ + skip, skipIf, skipUnless, Bcfg2TestCase, DBModelTestCase, syncdb, patchIf import Bcfg2.Server import Bcfg2.Server.Plugin from Bcfg2.Server.Plugins.Probes import * -- cgit v1.2.3-1-g7c22