def test_can_verify_against_unicode_hash(self): utf8_hash = unicode(generate_password_hash(self.passwd)) self.assertTrue( expr=password_matches_hash(self.passwd, utf8_hash), msg="ASCII password didn't match hash generated from utf8 version of itself.", )
def check_password(self, password): return password_matches_hash(password, self.password_hash)
def hash_and_check(self, real_password, attempted_password): hashed_password = generate_password_hash(real_password) return password_matches_hash(attempted_password, hashed_password)