  from djangorestframework.views import View
  from djangorestframework.resources import FormResource
  from djangorestframework.response import Response
  
  import StringIO
  
  class UploadFilesTests(TestCase):
      """Check uploading of files"""
      def setUp(self):
          self.factory = RequestFactory()
 
</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 </s> remove class UploadFilesTests(TestCase):
    """Check uploading of files"""
    def setUp(self):
        self.factory = RequestFactory()
 </s> add  </s> remove from djangorestframework.permissions import PerUserThrottling, PerViewThrottling, PerResourceThrottling
from djangorestframework.resources import FormResource
 </s> add from djangorestframework.permissions import PerUserThrottling, PerViewThrottling </s> remove     def test_upload_file(self):
 </s> add # class UploadFilesTests(TestCase):
#     """Check uploading of files"""
#     def setUp(self):
#         self.factory = RequestFactory() </s> remove from django.test import TestCase
from django import forms
 </s> add # from django.test import TestCase
# from django import forms
# import StringIO
  from djangorestframework.views import View
  from djangorestframework.resources import FormResource
  from djangorestframework.response import Response
  
# import StringIO
  
  class UploadFilesTests(TestCase):
      """Check uploading of files"""
      def setUp(self):
          self.factory = RequestFactory()
keep keep keep keep replace keep keep keep keep keep
 Drop out resources & mixins 
djangorestframework/tests/files.py