Merge the test clients environ setup from Django master

I have noticed and compared it because of flake8 issues, and the only
non-whitespace changes are the addition of `str()` and `b''` wrappers.
Merge pull request #152 from blueyed/merge-django-test-client

Merge client environ setup from Django master