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)
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)
def test_hashcmp(self): """ Test the hashcmp function. """ hash = hashpw(Config.password) assert hashcmp(hash, Config.password)