  from rest_framework import HTTP_HEADER_ENCODING
  from rest_framework import permissions
  from rest_framework import status
  from rest_framework.authtoken.models import Token
  from rest_framework.authentication import TokenAuthentication, BasicAuthentication, SessionAuthentication
  from rest_framework.compat import patterns
  from rest_framework.views import APIView
  import json
  import base64
  
 
</s>
from rest_framework.authentication import (
    BaseAuthentication,
    TokenAuthentication,
    BasicAuthentication,
    SessionAuthentication
)
  from rest_framework import HTTP_HEADER_ENCODING
  from rest_framework import permissions
  from rest_framework import status
  from rest_framework.authtoken.models import Token
from rest_framework.authentication import (
    BaseAuthentication,
    TokenAuthentication,
    BasicAuthentication,
    SessionAuthentication
)
  from rest_framework.compat import patterns
  from rest_framework.views import APIView
  import json
  import base64
  
keep keep keep keep replace keep keep keep keep keep
 Auth is no longer lazy.  Closes #667.

More consistent auth failure behavior.
rest_framework/tests/authentication.py