  import base64
  
  factory = APIRequestFactory()
  
  
  class BasicModel(models.Model):
      text = models.CharField(max_length=100)
  
  
  class RootView(generics.ListCreateAPIView):
      model = BasicModel
      authentication_classes = [authentication.BasicAuthentication]
      permission_classes = [permissions.DjangoModelPermissions]
  
 
</s> remove class IsOwnerPermission(permissions.BasePermission):
    def has_object_permission(self, request, view, obj):
        return request.user == obj.owner


class OwnerInstanceView(generics.RetrieveUpdateDestroyAPIView):
    model = OwnerModel
 </s> add class ObjectPermissionInstanceView(generics.RetrieveUpdateDestroyAPIView):
    model = BasicModel </s> remove class OwnerModel(models.Model):
    text = models.CharField(max_length=100)
    owner = models.ForeignKey(User)
 </s> add class BasicPermModel(BasicModel): </s> remove from rest_framework.test import APIRequestFactory
 </s> add 
  import base64
  
  factory = APIRequestFactory()
  





  class RootView(generics.ListCreateAPIView):
      model = BasicModel
      authentication_classes = [authentication.BasicAuthentication]
      permission_classes = [permissions.DjangoModelPermissions]
  
keep keep keep keep replace replace replace replace replace keep keep keep keep keep
 some properly failing tests, set up for standard permissions 
rest_framework/tests/test_permissions.py