patrys/httmock — pull request #8 by gmr (2013-09-25 03:15:53+00:00)
Title: Conditionally encode the response for Python 3.2 and Python 3.3 to work properly

Without the encoding, requests will bomb out in Python 3 with:

Traceback (most recent call last):
self.assertEqual(self.content, response.json())
File "/home/travis/virtualenv/python3.2/lib/python3.2/site-packages/requests/models.py", line 687, in json
encoding = guess_json_utf(self.content)
File "/home/travis/virtualenv/python3.2/lib/python3.2/site-packages/requests/utils.py", line 518, in guess_json_utf
nullcount = sample.count(_null)
TypeError: Can't convert 'bytes' object to str implicitly