Exemplo n.º 1
0
    def test_password_match(self):
        """Try to match a given hash"""

        tst = User()
        tst._password = self.test_hash

        ok_(tst._password == self.test_hash, "Setting should have hash")
        ok_(tst.password == self.test_hash, "Getting should have hash")
        ok_(tst.validate_password(self.test_password),
            "The password should pass against the given hash: " + tst.password)
Exemplo n.º 2
0
    def test_password_match(self):
        """Try to match a given hash"""

        tst = User()
        tst._password = self.test_hash

        ok_(tst._password == self.test_hash, "Setting should have hash")
        ok_(tst.password == self.test_hash, "Getting should have hash")
        ok_(tst.validate_password(self.test_password),
            "The password should pass against the given hash: " + tst.password)