# threads, where we can set an arbitrary timeout for some piece of code under # test, we use eventlet with the standard socket library patched. We have to # perform this setup at module import time, since all the socket module # bindings in the swiftclient code will have been made by the time nose # invokes the package or class setup methods. eventlet.hubs.use_hub(utils.get_hub()) eventlet.patcher.monkey_patch(all=False, socket=True) eventlet.debug.hub_exceptions(False) from swiftclient import get_auth, http_connection has_insecure = False try: from swiftclient import __version__ as client_version # Prevent a ValueError in StrictVersion with '2.0.3.68.ga99c2ff' client_version = '.'.join(client_version.split('.')[:3]) except ImportError: # Pre-PBR we had version, not __version__. Anyhow... client_version = '1.2' from distutils.version import StrictVersion if StrictVersion(client_version) >= StrictVersion('2.0'): has_insecure = True config = {} web_front_end = None normalized_urls = None # If no config was read, we will fall back to old school env vars swift_test_auth_version = None swift_test_auth = os.environ.get('SWIFT_TEST_AUTH')
# threads, where we can set an arbitrary timeout for some piece of code under # test, we use eventlet with the standard socket library patched. We have to # perform this setup at module import time, since all the socket module # bindings in the swiftclient code will have been made by the time nose # invokes the package or class setup methods. eventlet.hubs.use_hub(utils.get_hub()) eventlet.patcher.monkey_patch(all=False, socket=True) eventlet.debug.hub_exceptions(False) from swiftclient import get_auth, http_connection has_insecure = False try: from swiftclient import __version__ as client_version # Prevent a ValueError in StrictVersion with '2.0.3.68.ga99c2ff' client_version = '.'.join(client_version.split('.')[:3]) except ImportError: # Pre-PBR we had version, not __version__. Anyhow... client_version = '1.2' from distutils.version import StrictVersion if StrictVersion(client_version) >= StrictVersion('2.0'): has_insecure = True config = {} web_front_end = None normalized_urls = None # If no config was read, we will fall back to old school env vars swift_test_auth_version = None swift_test_auth = os.environ.get('SWIFT_TEST_AUTH')
# test, we use eventlet with the standard socket library patched. We have to # perform this setup at module import time, since all the socket module # bindings in the swiftclient code will have been made by the time nose # invokes the package or class setup methods. eventlet.hubs.use_hub(utils.get_hub()) eventlet.patcher.monkey_patch(all=False, socket=True) eventlet.debug.hub_exceptions(False) from swiftclient import get_auth, http_connection has_insecure = False try: from swiftclient import __version__ as client_version # Prevent a ValueError in StrictVersion with '2.0.3.68.ga99c2ff' client_version = ".".join(client_version.split(".")[:3]) except ImportError: # Pre-PBR we had version, not __version__. Anyhow... client_version = "1.2" from distutils.version import StrictVersion if StrictVersion(client_version) >= StrictVersion("2.0"): has_insecure = True config = {} web_front_end = None normalized_urls = None # If no config was read, we will fall back to old school env vars swift_test_auth_version = None