      SessionAuthentication
  )
  from rest_framework.compat import patterns
  from rest_framework.views import APIView
  import json
  import base64
  
  
  factory = RequestFactory()
 
</s> remove from rest_framework.authentication import TokenAuthentication, BasicAuthentication, SessionAuthentication
 </s> add from rest_framework.authentication import (
    BaseAuthentication,
    TokenAuthentication,
    BasicAuthentication,
    SessionAuthentication
)
from rest_framework.tests.utils import RequestFactory
      SessionAuthentication
  )
  from rest_framework.compat import patterns
from rest_framework.tests.utils import RequestFactory
  from rest_framework.views import APIView
  import json
  import base64
  
  
  factory = RequestFactory()
keep keep add keep keep keep keep keep keep
 Auth is no longer lazy.  Closes #667.

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