tests: swiftclient supports insecure
We already require swiftclient>=3.2.0, and have for years. We can stop checking whether it's 1.x Related-Change: I9842c9975821bda5c7d8bf2fc214480c0c0a5e96 Change-Id: I798904ab66ca10e21b4999ed7f2be74d1b63584c
This commit is contained in:
parent
bd5076ebe6
commit
f871591baa
@ -80,19 +80,6 @@ from test.functional.swift_test_client import Account, Connection, Container, \
|
||||
|
||||
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
|
||||
@ -1099,10 +1086,7 @@ def reset_globals():
|
||||
|
||||
|
||||
def connection(url):
|
||||
if has_insecure:
|
||||
parsed_url, http_conn = http_connection(url, insecure=insecure)
|
||||
else:
|
||||
parsed_url, http_conn = http_connection(url)
|
||||
parsed_url, http_conn = http_connection(url, insecure=insecure)
|
||||
|
||||
orig_request = http_conn.request
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user