'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}.'

def test_setResponse(self):

    c = CramMD5Credentials()
    chal = c.getChallenge()
    c.setResponse('    '.join(('squirrel', hexlify(HMAC('supersecret', chal).digest()))))
    self.assertTrue(c.checkPassword('supersecret'))
    self.assertEqual(c.username, 'squirrel')
