Closed marcaurele closed 6 years ago
with CaseInsensitiveDict
, it seems that the tests can remains as is.
index 0853fbe..786fcd7 100644
--- a/cs/client.py
+++ b/cs/client.py
@@ -16,6 +16,7 @@ except ImportError: # python 2
from urllib import quote
import requests
+from requests.structures import CaseInsensitiveDict
PY2 = sys.version_info < (3, 0)
@@ -110,8 +111,9 @@ class CloudStack(object):
def _prepare_request(self, command, json, opcode_name, fetch_list,
**kwargs):
+ kwargs = CaseInsensitiveDict(kwargs)
kwargs.update({
'apiKey': self.key,
opcode_name: command,
})
if json:
@@ -120,7 +122,7 @@ class CloudStack(object):
kwargs.setdefault('pagesize', 500)
kwarg = 'params' if self.method == 'get' else 'data'
- return kwarg, kwargs
+ return kwarg, dict(kwargs._store.values())
Fixed in #53 :+1:
Fix #51