  
  class DecoratorTestCase(TestCase):
  
      def setUp(self):
          self.factory = DRFRequestFactory()
  
      def _finalize_response(self, request, response, *args, **kwargs):
          response.request = request
          return APIView.finalize_response(self, request, response, *args, **kwargs)
  
 
</s> remove from rest_framework.tests.utils import DRFRequestFactory
 </s> add from rest_framework.tests.utils import RequestFactory </s> remove factory = DRFRequestFactory()
 </s> add factory = RequestFactory() </s> remove class InstanceView(generics.RetrievePartialUpdateDestroyAPIView):
 </s> add class InstanceView(generics.RetrieveUpdateDestroyAPIView): </s> remove class DRFRequestFactory(RequestFactory):
 </s> add class RequestFactory(RequestFactory): </s> remove from rest_framework.tests.utils import DRFRequestFactory
 </s> add from rest_framework.tests.utils import RequestFactory
        self.factory = RequestFactory()
  
  class DecoratorTestCase(TestCase):
  
      def setUp(self):
        self.factory = RequestFactory()
  
      def _finalize_response(self, request, response, *args, **kwargs):
          response.request = request
          return APIView.finalize_response(self, request, response, *args, **kwargs)
  
keep keep keep keep replace keep keep keep keep keep
 Renaming DRFRequestFactory to RequestFactory

Updated tests to reflect the new name. 
rest_framework/tests/decorators.py