  from django.core.cache import cache
  
  from djangorestframework.compat import RequestFactory
  from djangorestframework.views import View
  from djangorestframework.permissions import PerUserThrottling, PerViewThrottling, PerResourceThrottling
  from djangorestframework.resources import FormResource
  from djangorestframework.response import Response
  
  
  class MockView(View):
      permission_classes = (PerUserThrottling,)
 
</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 from django.test import TestCase
from django import forms
 </s> add # from django.test import TestCase
# from django import forms </s> remove import StringIO
 </s> add # import StringIO </s> remove from django import forms
from django.db import models
from django.test import TestCase
from djangorestframework.resources import FormResource, ModelResource
from djangorestframework.response import ImmediateResponse
from djangorestframework.views import View
 </s> add # from django import forms
# from django.db import models
# from django.test import TestCase
# from djangorestframework.response import ImmediateResponse
# from djangorestframework.views import View </s> remove from django.conf.urls.defaults import patterns, url
from django.forms import ModelForm
from django.contrib.auth.models import Group, User
from djangorestframework.resources import ModelResource
from djangorestframework.views import ListOrCreateModelView, InstanceModelView
from djangorestframework.tests.models import CustomUser
from djangorestframework.tests.testcases import TestModelsTestCase
 </s> add # from django.conf.urls.defaults import patterns, url
# from django.forms import ModelForm
# from django.contrib.auth.models import Group, User
# from djangorestframework.resources import ModelResource
# from djangorestframework.views import ListOrCreateModelView, InstanceModelView
# from djangorestframework.tests.models import CustomUser
# from djangorestframework.tests.testcases import TestModelsTestCase
from djangorestframework.permissions import PerUserThrottling, PerViewThrottling
  from django.core.cache import cache
  
  from djangorestframework.compat import RequestFactory
  from djangorestframework.views import View
from djangorestframework.permissions import PerUserThrottling, PerViewThrottling
from djangorestframework.permissions import PerUserThrottling, PerViewThrottling
  from djangorestframework.response import Response
  
  
  class MockView(View):
      permission_classes = (PerUserThrottling,)
keep keep keep keep replace replace keep keep keep keep keep
 Drop out resources & mixins 
djangorestframework/tests/throttling.py