Merge 80fa133255 into 866fb0202a
This commit is contained in:
commit
d109145460
2 changed files with 4 additions and 0 deletions
|
|
@ -209,6 +209,9 @@ class TwythonAPITestCase(unittest.TestCase):
|
||||||
self.register_response(responses.GET, url, body='{"id": 210462857140252672}')
|
self.register_response(responses.GET, url, body='{"id": 210462857140252672}')
|
||||||
|
|
||||||
data = self.api.request(endpoint, params={'id': 210462857140252672})
|
data = self.api.request(endpoint, params={'id': 210462857140252672})
|
||||||
|
|
||||||
|
if 'headers' in data:
|
||||||
|
del data['headers']
|
||||||
|
|
||||||
self.assertEqual({'id': 210462857140252672}, data)
|
self.assertEqual({'id': 210462857140252672}, data)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -202,6 +202,7 @@ class Twython(EndpointsMixin, object):
|
||||||
raise TwythonError('Response was not valid JSON. \
|
raise TwythonError('Response was not valid JSON. \
|
||||||
Unable to decode.')
|
Unable to decode.')
|
||||||
|
|
||||||
|
content['headers']=dict(response.headers)
|
||||||
return content
|
return content
|
||||||
|
|
||||||
def _get_error_message(self, response):
|
def _get_error_message(self, response):
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue