          response = root_view(request, pk=1)
          self.assertEqual(response.status_code, status.HTTP_201_CREATED)
  
      def test_get_queryset_has_create_permissions(self):
          request = factory.post('/', {'text': 'foobar'}, format='json',
                                 HTTP_AUTHORIZATION=self.permitted_credentials)
          response = get_queryset_list_view(request, pk=1)
 
</s>
    def test_api_root_view_discard_default_django_model_permission(self):
        """
        We check that DEFAULT_PERMISSION_CLASSES can
        apply to APIRoot view. More specifically we check expected behavior of
        ``_ignore_model_permissions`` attribute support.
        """
        request = factory.get('/', format='json',
                              HTTP_AUTHORIZATION=self.permitted_credentials)
        request.resolver_match = ResolverMatch('get', (), {})
        response = api_root_view(request)
        self.assertEqual(response.status_code, status.HTTP_200_OK)

          response = root_view(request, pk=1)
          self.assertEqual(response.status_code, status.HTTP_201_CREATED)
  
    def test_api_root_view_discard_default_django_model_permission(self):
        """
        We check that DEFAULT_PERMISSION_CLASSES can
        apply to APIRoot view. More specifically we check expected behavior of
        ``_ignore_model_permissions`` attribute support.
        """
        request = factory.get('/', format='json',
                              HTTP_AUTHORIZATION=self.permitted_credentials)
        request.resolver_match = ResolverMatch('get', (), {})
        response = api_root_view(request)
        self.assertEqual(response.status_code, status.HTTP_200_OK)

      def test_get_queryset_has_create_permissions(self):
          request = factory.post('/', {'text': 'foobar'}, format='json',
                                 HTTP_AUTHORIZATION=self.permitted_credentials)
          response = get_queryset_list_view(request, pk=1)
keep keep add keep keep keep keep
 Allow DjangoObjectPermissions to use views that define get_queryset
tests/test_permissions.py