Fix HTTP headers case for API unit tests

Some of HTTP headers have different case using python3.
Consider it in our unit tests to improve py 2/3 compatibility.

Change-Id: If70e9c4076bf4528952a4aeb7410b8e12c688581
Partially-Implements: bp py3-compatibility
This commit is contained in:
Valeriy Ponomaryov 2015-08-07 15:10:04 +03:00
parent a26012e34e
commit 7ee76bafb1
1 changed files with 1 additions and 4 deletions

View File

@ -130,7 +130,7 @@ class TestOpenStackClient(object):
auth_headers = {}
for k, v in response.getheaders():
auth_headers[k] = v
auth_headers[k.lower()] = v
self.auth_result = auth_headers
return self.auth_result
@ -138,9 +138,6 @@ class TestOpenStackClient(object):
def api_request(self, relative_uri, check_response_status=None, **kwargs):
auth_result = self._authenticate()
# NOTE(justinsb): http_client 'helpfully' converts headers
# to lower case
base_uri = auth_result['x-server-management-url']
full_uri = '%s/%s' % (base_uri, relative_uri)