          file.name = 'stuff.txt'
          request = self.factory.post('/', {'file': file})
          view = MockView.as_view()
          response = view(request)
          self.assertEquals(response.content, '{"FILE_CONTENT": "stuff", "FILE_NAME": "stuff.txt"}')
  
 
</s> remove                 return {'FILE_NAME': self.CONTENT['file'].name,
                        'FILE_CONTENT': self.CONTENT['file'].read()}
 </s> add                 return Response({'FILE_NAME': self.CONTENT['file'].name,
                        'FILE_CONTENT': self.CONTENT['file'].read()}) </s> remove                 return {'a':1, 'b':2, 'c':3}
 </s> add                 return Response({'a':1, 'b':2, 'c':3}) </s> remove         content = json.loads(response.content)
 </s> add         content = response.raw_content </s> remove         content = json.loads(response.content)
 </s> add         content = response.raw_content </s> remove         content = json.loads(response.content)
 </s> add         content = response.raw_content
        self.assertEquals(response.raw_content, {"FILE_CONTENT": "stuff", "FILE_NAME": "stuff.txt"})
          file.name = 'stuff.txt'
          request = self.factory.post('/', {'file': file})
          view = MockView.as_view()
          response = view(request)
        self.assertEquals(response.raw_content, {"FILE_CONTENT": "stuff", "FILE_NAME": "stuff.txt"})
  
keep keep keep keep replace keep
 Response as a subclass of HttpResponse - first draft, not quite there yet. 
djangorestframework/tests/files.py