def test_setResponse(self):
        """
        When C{setResponse} is called with a string that is the username and
        the hashed challenge separated with a space, they will be set on the
        L{CramMD5Credentials}.
        """
        c = CramMD5Credentials()
        chal = c.getChallenge()
        c.setResponse(b" ".join(
            (b"squirrel",
             hexlify(HMAC(b'supersecret', chal).digest()))))
        self.assertTrue(c.checkPassword(b'supersecret'))
        self.assertEqual(c.username, b"squirrel")

        When C{setResponse} is called with a string that is the username and
        the hashed challenge separated with a space, they will be set on the
        L{CramMD5Credentials}.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/cred/test/test_cramauth.py