          credentials = ('%s:%s' % (self.username, self.password))
          base64_credentials = base64.b64encode(credentials.encode(HTTP_HEADER_ENCODING)).decode(HTTP_HEADER_ENCODING)
          auth = 'Basic %s' % base64_credentials
          response = self.csrf_client.post('/basic/', {'example': 'example'}, HTTP_AUTHORIZATION=auth)
          self.assertEqual(response.status_code, 200)
  
      def test_post_json_passing_basic_auth(self):
          """Ensure POSTing form over basic auth with correct credentials passes and does not require CSRF"""
          credentials = ('%s:%s' % (self.username, self.password))
          base64_credentials = base64.b64encode(credentials.encode(HTTP_HEADER_ENCODING)).decode(HTTP_HEADER_ENCODING)
 
</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) </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)
        self.assertEqual(response.status_code, status.HTTP_200_OK)
          credentials = ('%s:%s' % (self.username, self.password))
          base64_credentials = base64.b64encode(credentials.encode(HTTP_HEADER_ENCODING)).decode(HTTP_HEADER_ENCODING)
          auth = 'Basic %s' % base64_credentials
          response = self.csrf_client.post('/basic/', {'example': 'example'}, HTTP_AUTHORIZATION=auth)
        self.assertEqual(response.status_code, status.HTTP_200_OK)
  
      def test_post_json_passing_basic_auth(self):
          """Ensure POSTing form over basic auth with correct credentials passes and does not require CSRF"""
          credentials = ('%s:%s' % (self.username, self.password))
          base64_credentials = base64.b64encode(credentials.encode(HTTP_HEADER_ENCODING)).decode(HTTP_HEADER_ENCODING)
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