From 7ee76bafb100a0a9b29acd26028b52dc89562519 Mon Sep 17 00:00:00 2001 From: Valeriy Ponomaryov Date: Fri, 7 Aug 2015 15:10:04 +0300 Subject: [PATCH] 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 --- manila/tests/integrated/api/client.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/manila/tests/integrated/api/client.py b/manila/tests/integrated/api/client.py index 7f977cac89..4393dbf528 100644 --- a/manila/tests/integrated/api/client.py +++ b/manila/tests/integrated/api/client.py @@ -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)