  from django.test import TestCase
  from django.contrib.auth.models import User
  from django.core.cache import cache
  
  from rest_framework.compat import RequestFactory
  from rest_framework.views import APIView
  from rest_framework.throttling import UserRateThrottle
  from rest_framework.response import Response
  
  
 
</s> remove from rest_framework.compat import RequestFactory
 </s> add from django.test.client import RequestFactory </s> remove # from rest_framework.compat import RequestFactory
 </s> add # from django.test.client import RequestFactory </s> remove # from rest_framework.compat import RequestFactory
 </s> add # from django.test.client import RequestFactory </s> remove # from rest_framework.compat import RequestFactory
 </s> add # from django.test.client import RequestFactory </s> remove from rest_framework.compat import RequestFactory
 </s> add from django.test.client import RequestFactory
from django.test.client import RequestFactory
  from django.test import TestCase
  from django.contrib.auth.models import User
  from django.core.cache import cache
  
from django.test.client import RequestFactory
  from rest_framework.views import APIView
  from rest_framework.throttling import UserRateThrottle
  from rest_framework.response import Response
  
  
keep keep keep keep replace keep keep keep keep keep
 Remove RequestFactory from compat (Now 1.2 is not supported) 
rest_framework/tests/throttling.py