          self.assertEqual(response.status_code, status.HTTP_404_NOT_FOUND)
  
      # Read list
      def test_can_read_list_permissions(self):
          request = factory.get('/', HTTP_AUTHORIZATION=self.credentials['readonly'])
          object_permissions_list_view.cls.filter_backends = (DjangoObjectPermissionsFilter,)
 
</s>
    def test_can_read_get_queryset_permissions(self):
        """
        same as ``test_can_read_permissions`` but with a view
        that rely on ``.get_queryset()`` instead of ``.queryset``.
        """
        request = factory.get('/1', HTTP_AUTHORIZATION=self.credentials['readonly'])
        response = get_queryset_object_permissions_view(request, pk='1')
        self.assertEqual(response.status_code, status.HTTP_200_OK)

          self.assertEqual(response.status_code, status.HTTP_404_NOT_FOUND)
  
    def test_can_read_get_queryset_permissions(self):
        """
        same as ``test_can_read_permissions`` but with a view
        that rely on ``.get_queryset()`` instead of ``.queryset``.
        """
        request = factory.get('/1', HTTP_AUTHORIZATION=self.credentials['readonly'])
        response = get_queryset_object_permissions_view(request, pk='1')
        self.assertEqual(response.status_code, status.HTTP_200_OK)

      # Read list
      def test_can_read_list_permissions(self):
          request = factory.get('/', HTTP_AUTHORIZATION=self.credentials['readonly'])
          object_permissions_list_view.cls.filter_backends = (DjangoObjectPermissionsFilter,)
keep add keep keep keep keep
 Allow DjangoObjectPermissions to use views that define get_queryset
tests/test_permissions.py