示例#1
0
 def test_wrongPassword(self):
     """
     Calling C{checkPassword} on a L{UsernameHashedPassword} will return
     L{False} when the password given is NOT the password on the object.
     """
     creds = UsernameHashedPassword(b"user", b"pass")
     self.assertFalse(creds.checkPassword(b"someotherpass"))
示例#2
0
 def test_wrongPassword(self):
     """
     Calling C{checkPassword} on a L{UsernameHashedPassword} will return
     L{False} when the password given is NOT the password on the object.
     """
     creds = UsernameHashedPassword(b"user", b"pass")
     self.assertFalse(creds.checkPassword(b"someotherpass"))
示例#3
0
 def test_correctPassword(self):
     """
     Calling C{checkPassword} on a L{UsernameHashedPassword} will return
     L{True} when the password given is the password on the object.
     """
     creds = UsernameHashedPassword(b"user", b"pass")
     self.assertTrue(creds.checkPassword(b"pass"))
示例#4
0
 def test_correctPassword(self):
     """
     Calling C{checkPassword} on a L{UsernameHashedPassword} will return
     L{True} when the password given is the password on the object.
     """
     creds = UsernameHashedPassword(b"user", b"pass")
     self.assertTrue(creds.checkPassword(b"pass"))