tastypie のテストコード
https://github.com/toastdriven/django-tastypie/blob/master/tests/basic/tests/http.py
connection = self.get_connection() post_data = '{"content": "A new post.", "is_active": true, "title": "New Title", "slug": "new-title", "user": "/api/v1/users/1/"}' connection.request('POST', '/api/v1/notes/', body=post_data, headers={'Accept': 'application/json', 'Content-type': 'application/json'})