Esempio n. 1
0
 def test_set_password(self):
     """
     Test User.set_password().
     """
     user = User(username=Config.username)
     user.set_password(Config.password)
     assert hashcmp(user.password, Config.password)
Esempio n. 2
0
 def test_create(self):
     """
     Test User.create().
     """
     user = User.create(Config.username, Config.password)
     assert user.username == Config.username
     assert hashcmp(user.password, Config.password)
Esempio n. 3
0
 def test_hashcmp(self):
     """
     Test the hashcmp function.
     """
     hash = hashpw(Config.password)
     assert hashcmp(hash, Config.password)