tomchristie/django-rest-framework — pull request #1356 by w00kie (2014-01-15 06:06:43+00:00)
Title: APIClient for unit tests cannot upload files in Python 3.3

Related to #962 and #1347.

Hello,

Here is a pull request for two tests showing the issue I am facing with unit testing file uploads. `test_fileupload` will pass in Python 2.7 and fail on Python 3.3 with the error:

```python
TypeError: b'This is a dummy file.' is not JSON serializable
```

I have tried to force content_type to `multipart/form-data` to avoid the JSON serialization but then I face the issue that the `request.DATA` and `request.FILES` are empty in the view as exposed with the `test_echo_multipart` test (this fails in both Python versions).