def setUp(self):
     from letsencrypt.acme.challenges import DVSNI
     self.msg = DVSNI(r="O*\xb4-\xad\xec\x95>\xed\xa9\r0\x94\xe8\x97\x9c&6"
                      "\xbf'\xb3\xed\x9a9nX\x0f'\\m\xe7\x12",
                      nonce='\xa8-_\xf8\xeft\r\x12\x88\x1fm<"w\xab.')
     self.jmsg = {
         'type': 'dvsni',
         'r': 'Tyq0La3slT7tqQ0wlOiXnCY2vyez7Zo5blgPJ1xt5xI',
         'nonce': 'a82d5ff8ef740d12881f6d3c2277ab2e',
     }
 def test_z_and_domain(self):
     from letsencrypt.acme.challenges import DVSNI
     challenge = DVSNI(
         r="O*\xb4-\xad\xec\x95>\xed\xa9\r0\x94\xe8\x97\x9c&6"
         "\xbf'\xb3\xed\x9a9nX\x0f'\\m\xe7\x12",
         nonce=long('439736375371401115242521957580409149254868992063'
                    '44333654741504362774620418661L'))
     # pylint: disable=invalid-name
     z = '38e612b0397cc2624a07d351d7ef50e46134c0213d9ed52f7d7c611acaeed41b'
     self.assertEqual(z, self.msg.z(challenge))
     self.assertEqual('{0}.acme.invalid'.format(z),
                      self.msg.z_domain(challenge))