              permissions = ()
              form = FileForm
  
              def post(self, request, *args, **kwargs):
                  return {'FILE_NAME': self.CONTENT['file'].name,
                          'FILE_CONTENT': self.CONTENT['file'].read()}
  
          file = StringIO.StringIO('stuff')
          file.name = 'stuff.txt'
          request = self.factory.post('/', {'file': file})
          view = MockView.as_view()
 
</s> remove         self.assertEquals(response.content, '{"FILE_CONTENT": "stuff", "FILE_NAME": "stuff.txt"}')
 </s> add         self.assertEquals(response.raw_content, {"FILE_CONTENT": "stuff", "FILE_NAME": "stuff.txt"}) </s> remove         self.headers = {}
 </s> add  </s> remove                 return {'a':1, 'b':2, 'c':3}
 </s> add                 return Response({'a':1, 'b':2, 'c':3}) </s> remove             self.initial(request, *args, **kwargs)
 </s> add             # `initial` is the opportunity to temper with the request, 
            # even completely replace it.
            self.request = request = self.initial(request, *args, **kwargs) </s> remove         response_obj = {
 </s> add         content = {
                return Response({'FILE_NAME': self.CONTENT['file'].name,
                        'FILE_CONTENT': self.CONTENT['file'].read()})
              permissions = ()
              form = FileForm
  
              def post(self, request, *args, **kwargs):
                return Response({'FILE_NAME': self.CONTENT['file'].name,
                        'FILE_CONTENT': self.CONTENT['file'].read()})
                return Response({'FILE_NAME': self.CONTENT['file'].name,
                        'FILE_CONTENT': self.CONTENT['file'].read()})
  
          file = StringIO.StringIO('stuff')
          file.name = 'stuff.txt'
          request = self.factory.post('/', {'file': file})
          view = MockView.as_view()
keep keep keep keep replace replace keep keep keep keep keep
 Response as a subclass of HttpResponse - first draft, not quite there yet. 
djangorestframework/tests/files.py