      """Check uploading of files"""
      def setUp(self):
          self.factory = RequestFactory()
  
      def test_upload_file(self):
  
          class FileForm(forms.Form):
              file = forms.FileField()
  
          class MockView(View):
 
</s> remove class UploadFilesTests(TestCase):
    """Check uploading of files"""
    def setUp(self):
        self.factory = RequestFactory()
 </s> add  </s> remove         class FileForm(forms.Form):
            file = forms.FileField()
 </s> add #     def test_upload_file(self): </s> remove import StringIO
 </s> add # import StringIO </s> remove         class MockView(View):
            permissions = ()
            form = FileForm
 </s> add #         class FileForm(forms.Form):
#             file = forms.FileField() </s> remove from djangorestframework.compat import RequestFactory
from djangorestframework.views import View
from djangorestframework.resources import FormResource
from djangorestframework.response import Response
 </s> add # from djangorestframework.compat import RequestFactory
# from djangorestframework.views import View
# from djangorestframework.response import Response
# class UploadFilesTests(TestCase):
#     """Check uploading of files"""
#     def setUp(self):
#         self.factory = RequestFactory()
      """Check uploading of files"""
      def setUp(self):
          self.factory = RequestFactory()
  
# class UploadFilesTests(TestCase):
#     """Check uploading of files"""
#     def setUp(self):
#         self.factory = RequestFactory()
  
          class FileForm(forms.Form):
              file = forms.FileField()
  
          class MockView(View):
keep keep keep keep replace keep keep keep keep keep
 Drop out resources & mixins 
djangorestframework/tests/files.py