You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@libcloud.apache.org by to...@apache.org on 2017/09/19 19:01:01 UTC

[6/7] libcloud git commit: Also make sure we normalize all the header values in the connection mock classes.

Also make sure we normalize all the header values in the connection
mock classes.


Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/e954cdff
Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/e954cdff
Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/e954cdff

Branch: refs/heads/trunk
Commit: e954cdffb424b86ed61c18ddabd7e3d74b4c1dd6
Parents: 1c33d58
Author: Tomaz Muraus <to...@tomaz.me>
Authored: Tue Sep 19 17:47:52 2017 +0200
Committer: Tomaz Muraus <to...@tomaz.me>
Committed: Tue Sep 19 21:00:18 2017 +0200

----------------------------------------------------------------------
 libcloud/test/__init__.py | 2 ++
 1 file changed, 2 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/libcloud/blob/e954cdff/libcloud/test/__init__.py
----------------------------------------------------------------------
diff --git a/libcloud/test/__init__.py b/libcloud/test/__init__.py
index 6691766..645105e 100644
--- a/libcloud/test/__init__.py
+++ b/libcloud/test/__init__.py
@@ -133,6 +133,7 @@ class MockHttp(LibcloudConnection):
         return meth(method, url, body, headers)
 
     def request(self, method, url, body=None, headers=None, raw=False, stream=False):
+        headers = self._normalize_headers(headers=headers)
         r_status, r_body, r_headers, r_reason = self._get_request(method, url, body, headers)
         if r_body is None:
             r_body = ''
@@ -153,6 +154,7 @@ class MockHttp(LibcloudConnection):
 
     def prepared_request(self, method, url, body=None,
                          headers=None, raw=False, stream=False):
+        headers = self._normalize_headers(headers=headers)
         r_status, r_body, r_headers, r_reason = self._get_request(method, url, body, headers)
 
         with requests_mock.mock() as m: