          self.user = User.objects.create_user(self.username, self.email, self.password)
  
      def test_post_form_passing_basic_auth(self):
          """Ensure POSTing json over basic auth with correct credentials passes and does not require CSRF"""
          auth = 'Basic %s' % base64.encodestring('%s:%s' % (self.username, self.password)).strip()
          response = self.csrf_client.post('/', {'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"""
 
</s> remove             msg = "Invalid pk '%s' - object does not exist." % smart_unicode(data)
 </s> add             msg = "Invalid pk '%s' - object does not exist." % smart_text(data) </s> remove             msg = "Invalid pk '%s' - object does not exist." % smart_unicode(data)
 </s> add             msg = "Invalid pk '%s' - object does not exist." % smart_text(data) </s> remove     empty_error = u"Empty list and '%(class_name)s.allow_empty' is False."
 </s> add     empty_error = "Empty list and '%(class_name)s.allow_empty' is False." </s> remove     _MAX_CSRF_KEY = 18446744073709551616L     # 2 << 63
 </s> add     _MAX_CSRF_KEY = 18446744073709551616      # 2 << 63 </s> remove     words = word_split_re.split(force_unicode(text))
 </s> add     words = word_split_re.split(force_text(text))
        auth = b'Basic ' + base64.encodestring(('%s:%s' % (self.username, self.password)).encode('utf8')).strip()
          self.user = User.objects.create_user(self.username, self.email, self.password)
  
      def test_post_form_passing_basic_auth(self):
          """Ensure POSTing json over basic auth with correct credentials passes and does not require CSRF"""
        auth = b'Basic ' + base64.encodestring(('%s:%s' % (self.username, self.password)).encode('utf8')).strip()
          response = self.csrf_client.post('/', {'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"""
keep keep keep keep replace keep keep keep keep keep
 First passing test under p3k \o/ 
rest_framework/tests/authentication.py