  from rest_framework import (
      HTTP_HEADER_ENCODING, authentication, generics, permissions, serializers,
      status
  )
  from rest_framework.compat import get_model_name, guardian, unittest
  from rest_framework.filters import DjangoObjectPermissionsFilter
  from rest_framework.routers import DefaultRouter
  from rest_framework.test import APIRequestFactory
  from tests.models import BasicModel
  
 
</s> remove from rest_framework.compat import (
    distinct, django_filters, get_model_name, guardian
)
 </s> add from rest_framework.compat import distinct, django_filters, guardian </s> remove         model_name = get_model_name(BasicPermModel)
 </s> add         model_name = BasicPermModel._meta.model_name </s> remove from rest_framework.compat import get_model_name

 </s> add  </s> remove             'model_name': get_model_name(model_cls)
 </s> add             'model_name': model_cls._meta.model_name </s> remove             'model_name': get_model_name(model_cls)
 </s> add             'model_name': model_cls._meta.model_name
from rest_framework.compat import guardian, unittest
  from rest_framework import (
      HTTP_HEADER_ENCODING, authentication, generics, permissions, serializers,
      status
  )
from rest_framework.compat import guardian, unittest
  from rest_framework.filters import DjangoObjectPermissionsFilter
  from rest_framework.routers import DefaultRouter
  from rest_framework.test import APIRequestFactory
  from tests.models import BasicModel
  
keep keep keep keep replace keep keep keep keep keep
 Remove Django 1.5 get_model_name fallback 
tests/test_permissions.py