Пример #1
0
 def testCheckPassword(self):
     c = credentials.CramMD5Credentials()
     chal = c.getChallenge()
     c.response = hmac.HMAC('secret', chal).hexdigest()
     self.failUnless(c.checkPassword('secret'))
Пример #2
0
 def testWrongPassword(self):
     c = credentials.CramMD5Credentials()
     self.failIf(c.checkPassword('secret'))
Пример #3
0
 def testIdempotentChallenge(self):
     c = credentials.CramMD5Credentials()
     chal = c.getChallenge()
     self.assertEqual(chal, c.getChallenge())