  from django.core.urlresolvers import ResolverMatch
  from rest_framework.filters import DjangoObjectPermissionsFilter
  from rest_framework.test import APIRequestFactory
  from tests.models import BasicModel
  import base64
  
  factory = APIRequestFactory()
  
 
</s>
from rest_framework.routers import DefaultRouter
  from django.core.urlresolvers import ResolverMatch
  from rest_framework.filters import DjangoObjectPermissionsFilter
from rest_framework.routers import DefaultRouter
  from rest_framework.test import APIRequestFactory
  from tests.models import BasicModel
  import base64
  
  factory = APIRequestFactory()
  
keep add keep keep keep keep keep keep
 Allow DjangoObjectPermissions to use views that define get_queryset
tests/test_permissions.py