'If the challenge does not include a realm and the host part of the JID
includes bytes outside of the ASCII range, the response still includes
the host part of the JID as the realm.'

def test_getResponseNoRealmIDN(self):

    self.mechanism = sasl_mechanisms.DigestMD5(u'xmpp', u'\xe9chec.example.org', None, u'test', u'secret')
    challenge = 'nonce="1234",qop="auth",charset=utf-8,algorithm=md5-sess'
    directives = self.mechanism._parse(self.mechanism.getResponse(challenge))
    self.assertEqual(directives['realm'], '\xc3\xa9chec.example.org')
