  from django.utils import unittest
  from rest_framework import HTTP_HEADER_ENCODING
  from rest_framework import exceptions
  from rest_framework import permissions
  from rest_framework import status
  from rest_framework.authentication import (
      BaseAuthentication,
      TokenAuthentication,
      BasicAuthentication,
 
</s> remove             auth = None

        return (None, user, auth)
 </s> add             self._auth = None </s> remove             auth = api_settings.UNAUTHENTICATED_TOKEN()
 </s> add             self._auth = api_settings.UNAUTHENTICATED_TOKEN() </s> remove             user = None
 </s> add             self._user = None </s> remove             user = api_settings.UNAUTHENTICATED_USER()
 </s> add             self._user = api_settings.UNAUTHENTICATED_USER()
from rest_framework import renderers
from rest_framework.response import Response
  from django.utils import unittest
  from rest_framework import HTTP_HEADER_ENCODING
  from rest_framework import exceptions
  from rest_framework import permissions
from rest_framework import renderers
from rest_framework.response import Response
  from rest_framework import status
  from rest_framework.authentication import (
      BaseAuthentication,
      TokenAuthentication,
      BasicAuthentication,
keep keep keep add keep keep keep keep keep
 request.user should be still be accessible in renderer context if authentication fails 
rest_framework/tests/test_authentication.py