'The challenge issued by L{DigestCredentialFactory.getChallenge} must
include C{\'qop\'}, C{\'realm\'}, C{\'algorithm\'}, C{\'nonce\'}, and
C{\'opaque\'} keys.  The values for the C{\'realm\'} and C{\'algorithm\'}
keys must match the values supplied to the factory\'s initializer.
None of the values may have newlines in them.'

def test_getChallenge(self):

    challenge = self.credentialFactory.getChallenge(self.request)
    self.assertEqual(challenge['qop'], 'auth')
    self.assertEqual(challenge['realm'], 'test    realm')
    self.assertEqual(challenge['algorithm'], 'md5')
    self.assertIn('nonce', challenge)
    self.assertIn('opaque', challenge)
    for v in challenge.values():
        self.assertNotIn('\n', v)
