Fix test_version_discovery test

Something changed in requests/urllib3 library and now it sends
requests with url in a lower-case. It affects test_version_discovery
test because we use url in camel-case.

This patch changes test url to lower-case to be compatible with old
and new behaviours.

Change-Id: I4ae9715b124adb0a2e0115c9b00ab16576665f72
Closes-Bug: #1643874
(cherry picked from commit d3b6d542dd)
This commit is contained in:
Ivan Kolodyazhny 2016-11-22 14:48:41 +02:00 committed by Michael Dovgal
parent 3d31630c9a
commit e22222a428
2 changed files with 2 additions and 2 deletions

View File

@ -247,7 +247,7 @@ def keystone_request_callback(request, context):
context.headers["X-Subject-Token"] = token_id
context.status_code = 201
return token_data
elif "WrongDiscoveryResponse.discovery.com" in request.url:
elif "wrongdiscoveryresponse.discovery.com" in request.url:
return str(WRONG_VERSION_RESPONSE)
else:
context.status_code = 500

View File

@ -108,7 +108,7 @@ class ShellTest(utils.TestCase):
_shell = shell.OpenStackCinderShell()
sess = session.Session()
os_auth_url = "https://WrongDiscoveryResponse.discovery.com:35357/v2.0"
os_auth_url = "https://wrongdiscoveryresponse.discovery.com:35357/v2.0"
self.register_keystone_auth_fixture(mocker, os_auth_url)
self.assertRaises(DiscoveryFailure,