  from django.db import models
  from django.test import TestCase
  from django.utils import unittest
  from rest_framework import generics, status, permissions, authentication, HTTP_HEADER_ENCODING
  from rest_framework.compat import guardian
  from rest_framework.filters import DjangoObjectPermissionsFilter
  from rest_framework.test import APIRequestFactory
  from rest_framework.tests.models import BasicModel
  import base64
  
 
</s> remove from rest_framework.compat import django_filters, six, guardian
 </s> add from rest_framework.compat import django_filters, six, guardian, get_model_name </s> remove from rest_framework.compat import oauth2_provider_scope, oauth2_constants
 </s> add from rest_framework.compat import (get_model_name, oauth2_provider_scope,
                                   oauth2_constants) </s> remove         model_name = BasicPermModel._meta.module_name
 </s> add         model_name = get_model_name(BasicPermModel) </s> remove             'model_name': model_cls._meta.module_name
 </s> add             'model_name': get_model_name(model_cls) </s> remove             'model_name': model_cls._meta.module_name
 </s> add             'model_name': get_model_name(model_cls)
from rest_framework.compat import guardian, get_model_name
  from django.db import models
  from django.test import TestCase
  from django.utils import unittest
  from rest_framework import generics, status, permissions, authentication, HTTP_HEADER_ENCODING
from rest_framework.compat import guardian, get_model_name
  from rest_framework.filters import DjangoObjectPermissionsFilter
  from rest_framework.test import APIRequestFactory
  from rest_framework.tests.models import BasicModel
  import base64
  
keep keep keep keep replace keep keep keep keep keep
 Address pending deprecation of Model._meta.module_name in Django 1.6 
rest_framework/tests/test_permissions.py