  from django.test import TestCase
  from django.utils import simplejson as json
  from rest_framework import generics, serializers, status
  from rest_framework.tests.models import BasicModel, Comment, SlugBasedModel
  
  
  factory = DRFRequestFactory()
  
  
 
</s> remove from django.test.client import RequestFactory
 </s> add  </s> remove factory = RequestFactory()
 </s> add factory = DRFRequestFactory() </s> remove from django.test.client import RequestFactory
 </s> add # from django.test.client import RequestFactory </s> remove         self.factory = RequestFactory()
 </s> add         self.factory = DRFRequestFactory()
from rest_framework.tests.utils import DRFRequestFactory
  from django.test import TestCase
  from django.utils import simplejson as json
  from rest_framework import generics, serializers, status
from rest_framework.tests.utils import DRFRequestFactory
  from rest_framework.tests.models import BasicModel, Comment, SlugBasedModel
  
  
  factory = DRFRequestFactory()
  
  
keep keep add keep keep keep keep keep keep
 Adjust PATCH test cases to use the new DRFRequestFactory 
rest_framework/tests/generics.py