      def test_token_has_auto_assigned_key_if_none_provided(self):
          """Ensure creating a token with no key will auto-assign a key"""
          self.token.delete()
          token = self.model.objects.create(user=self.user)
          self.assertTrue(bool(token.key))
  
      def test_generate_key_returns_string(self):
          """Ensure generate_key returns a string"""
          token = self.model()
          key = token.generate_key()
 
</s> remove         self.assertTrue(isinstance(key, six.string_types))
 </s> add         assert isinstance(key, six.string_types) </s> remove         self.assertEqual(response.status_code, status.HTTP_200_OK)
 </s> add         assert response.status_code == status.HTTP_200_OK </s> remove         self.assertEqual(response.status_code, status.HTTP_200_OK)
 </s> add         assert response.status_code == status.HTTP_200_OK </s> remove         self.assertEqual(response.status_code, 400)
 </s> add         assert response.status_code == 400 </s> remove         self.assertEqual(response.status_code, 400)
 </s> add         assert response.status_code == 400
        assert bool(token.key)
      def test_token_has_auto_assigned_key_if_none_provided(self):
          """Ensure creating a token with no key will auto-assign a key"""
          self.token.delete()
          token = self.model.objects.create(user=self.user)
        assert bool(token.key)
  
      def test_generate_key_returns_string(self):
          """Ensure generate_key returns a string"""
          token = self.model()
          key = token.generate_key()
keep keep keep keep replace keep keep keep keep keep
 converted authentication_test asserts to pytest 
tests/test_authentication.py