def test_wrongPassword(self):
        """
        When an invalid response is set on the L{CramMD5Credentials} (one that
        is not the hex digest of the challenge, encrypted with the user's shared
        secret) and C{checkPassword} is called with the user's correct shared
        secret, it will return L{False}.
        """
        c = CramMD5Credentials()
        chal = c.getChallenge()
        c.response = hexlify(HMAC(b'thewrongsecret', chal).digest())
        self.assertFalse(c.checkPassword(b'secret'))

        When an invalid response is set on the L{CramMD5Credentials} (one that
        is not the hex digest of the challenge, encrypted with the user's shared
        secret) and C{checkPassword} is called with the user's correct shared
        secret, it will return L{False}.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/cred/test/test_cramauth.py