def test_user_auth_token(self):
     username = uuid.uuid4().hex
     password = uuid.uuid4().hex
     user = User.create(username, password)
     self.assertEqual(
         user.get_auth_token(),
         login_serializer.dumps([str(user.id), user.password]))
Пример #2
0
 def test_user_auth_token(self):
     username = uuid.uuid4().hex
     password = uuid.uuid4().hex
     user = User.create(username, password)
     self.assertEqual(
         user.get_auth_token(),
         login_serializer.dumps([str(user.id), user.password]))
Пример #3
0
 def get_auth_token(self):
     return login_serializer.dumps([str(self.id), self.password])