  from rest_framework import HTTP_HEADER_ENCODING
  from rest_framework import permissions
  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> remove         self.assertEqual(response.status_code, 401)
 </s> add         self.assertEqual(response.status_code, status.HTTP_401_UNAUTHORIZED) </s> remove         self.assertEqual(response.status_code, 401)
 </s> add         self.assertEqual(response.status_code, status.HTTP_401_UNAUTHORIZED) </s> remove         self.assertEqual(response.status_code, 401)
 </s> add         self.assertEqual(response.status_code, status.HTTP_401_UNAUTHORIZED) </s> remove         self.assertEqual(response.status_code, 401)
 </s> add         self.assertEqual(response.status_code, status.HTTP_401_UNAUTHORIZED)
from rest_framework import status
  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
keep add keep keep keep keep keep keep
 Replaced status numbers with the statuses constants from the status model. 
rest_framework/tests/authentication.py