mjuenema / python-sigfox-backend-api

Python wrapper for the Sigfox backend REST API
BSD 2-Clause "Simplified" License
5 stars 4 forks source link

test_callback_0 #7

Closed mjuenema closed 7 years ago

mjuenema commented 7 years ago

Works on my PC but not on Travis-CI:

======================================================================
ERROR: test_sigfoxapi.TestSigfoxCallbacks.test_callback_0_list_and_edit
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/travis/virtualenv/python3.5.3/lib/python3.5/site-packages/nose/case.py", line 198, in runTest
    self.test(*self.arg)
  File "/home/travis/build/mjuenema/python-sigfox-backend-api/tests/test_sigfoxapi.py", line 220, in test_callback_0_list_and_edit
    self.s.callback_new(SIGFOX_DEVICETYPE_ID, new_callbacks)
  File "/home/travis/build/mjuenema/python-sigfox-backend-api/sigfoxapi/__init__.py", line 456, in callback_new
    params=callbacks)
  File "/home/travis/build/mjuenema/python-sigfox-backend-api/sigfoxapi/__init__.py", line 168, in request
    resp = self.api.make_request(method, path, params=params, headers=headers)
  File "/home/travis/virtualenv/python3.5.3/lib/python3.5/site-packages/drest/api.py", line 200, in make_request
    return self.request.make_request(method, url, params, headers)
  File "/home/travis/virtualenv/python3.5.3/lib/python3.5/site-packages/drest/request.py", line 394, in make_request
    params = dict(self._extra_params, **params)
TypeError: type object argument after ** must be a mapping, not list
-------------------- >> begin captured stdout << ---------------------
DREST_DEBUG: method=GET url=https://backend.sigfox.com/api/devicetypes/[secure]/callbacks params={} headers={'Content-Type': 'application/json'}
DREST_DEBUG: supressing body for GET request
mjuenema commented 7 years ago

This is because of https://github.com/datafolklabs/drest/issues/35, i.e. drest currently does not allow submitting lists in POST requests.