def test_is_password_matching(self): """test the is_password_matching function""" password = "******" hashed_password = bcrypt.hashpw(password.encode("utf-8"), bcrypt.gensalt()) self.assertEqual( util.is_password_matching(password, hashed_password.decode("utf-8")), True )
def verify_password(self, plainext_password): return util.is_password_matching(plainext_password, self.hashed_password)