Merge pull request #118 from mdentremont/topic/py3-fix

Alter a statement to make it python3 compatible
This commit is contained in:
Mateusz Sikora 2015-11-06 15:16:07 +01:00
commit 315f6f2844

View File

@ -49,7 +49,7 @@ class BaseAPITestCase(object):
self.response = request_func(*args, **kwargs)
is_json = bool(
filter(lambda x: 'json' in x, self.response._headers['content-type']))
[x for x in self.response._headers['content-type'] if 'json' in x])
if is_json and self.response.content:
self.response.json = json.loads(self.response.content)
else: