          """Ensure token login view using JSON POST works."""
          client = Client(enforce_csrf_checks=True)
          response = client.post('/auth-token/',
                                 json.dumps({'username': self.username, 'password': self.password}), 'application/json')
          self.assertEqual(response.status_code, 200)
          self.assertEqual(json.loads(response.content.decode('ascii'))['token'], self.key)
  
      def test_token_login_json_bad_creds(self):
          """Ensure token login view using JSON POST fails if bad credentials are used."""
          client = Client(enforce_csrf_checks=True)
 
</s> remove         self.assertEqual(response.status_code, 200)
 </s> add         self.assertEqual(response.status_code, status.HTTP_200_OK) </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, 200)
 </s> add         self.assertEqual(response.status_code, status.HTTP_200_OK) </s> remove         self.assertEqual(response.status_code, 200)
 </s> add         self.assertEqual(response.status_code, status.HTTP_200_OK)
        self.assertEqual(response.status_code, status.HTTP_200_OK)
          """Ensure token login view using JSON POST works."""
          client = Client(enforce_csrf_checks=True)
          response = client.post('/auth-token/',
                                 json.dumps({'username': self.username, 'password': self.password}), 'application/json')
        self.assertEqual(response.status_code, status.HTTP_200_OK)
          self.assertEqual(json.loads(response.content.decode('ascii'))['token'], self.key)
  
      def test_token_login_json_bad_creds(self):
          """Ensure token login view using JSON POST fails if bad credentials are used."""
          client = Client(enforce_csrf_checks=True)
keep keep keep keep replace keep keep keep keep keep
 Replaced status numbers with the statuses constants from the status model. 
rest_framework/tests/authentication.py