Use real Response object in DjrillBackendMockAPITestCase tests.

(Improves testing accuracy around API response encoding.)

* Add `six` as test dependency (six.BytesIO, six.b)
* Change MockResponse content to bytes (because HTTP responses
  are bytes, not strings)
This commit is contained in:
medmunds
2015-01-16 13:18:17 -08:00
parent 4754ef7650
commit 11961b57e5
4 changed files with 13 additions and 10 deletions

View File

@@ -45,7 +45,8 @@ combinations of Django and Python versions. (Full list in
The included tests verify that Djrill constructs the expected Mandrill API
calls, without actually calling Mandrill or sending any email. So the tests
don't require a Mandrill API key, but they *do* require
`mock <http://www.voidspace.org.uk/python/mock/index.html>`_ (``pip install mock``).
`mock <http://www.voidspace.org.uk/python/mock/index.html>`_
and `six <https://pythonhosted.org/six/>`_ (``pip install mock six``).
To run the tests, either::