Exemplo n.º 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"))
Exemplo n.º 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"))
Exemplo n.º 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"))
Exemplo n.º 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"))