Commit 76aa608b authored by Romain Courteaud's avatar Romain Courteaud

[erp5_web_ui_test] Do not use HTTPSConnection over http

parent 0d55282a
......@@ -108,9 +108,12 @@ class TestStaticWebSectionRedirection(ERP5TypeTestCase):
# '%s://%s/VirtualHostBase/http/example.org:1234/erp5/web_site_module/VirtualHostRoot/%s/%s' % (api_scheme, api_netloc, website.getId(), source_path)
]:
_, netloc_to_check, _, _, _ = urlparse.urlsplit(url_to_check)
scheme_to_check, netloc_to_check, _, _, _ = urlparse.urlsplit(url_to_check)
if (scheme_to_check == 'https'):
connection = httplib.HTTPSConnection(netloc_to_check, context=ssl._create_unverified_context(), timeout=10)
else:
connection = httplib.HTTPConnection(netloc_to_check, timeout=10)
connection.request(
method="GET",
url=url_to_check
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment