コード例 #1
0
 def test_user_incorrect_password(self):
     email = 'email'
     password = '******'
     add_to_database(User(email=email, password=password))
     user = User.get_user_by_email(email)
     assert user.password != password
     assert not bcrypt.check_password_hash(user.password, 'temp')
     assert bcrypt.check_password_hash(user.password, password)
コード例 #2
0
 def test_user_incorrect_password(self):
     email = 'email'
     password = '******'
     add_to_database(User(email=email, password=password))
     user = User.get_user_by_email(email)
     assert user.password != password
     assert not bcrypt.check_password_hash(user.password, 'temp')
     assert bcrypt.check_password_hash(user.password, password)
コード例 #3
0
 def check_password(self, password):
     return bcrypt.check_password_hash(self.password, password)
コード例 #4
0
 def check_password(self, password):
     return bcrypt.check_password_hash(self.password, password)