def setUp(self): challs = ( challenges.SimpleHTTPS(token='IlirfxKKXAsHtmzK29Pj8A'), challenges.DNS(token='DGyRejmCefe7v4NfDGDKfA'), challenges.RecoveryToken(), ) combinations = ((0, 2), (1, 2)) from letsencrypt.acme.messages import Challenge self.msg = Challenge( session_id='aefoGaavieG9Wihuk2aufai3aeZ5EeW4', nonce='\xec\xd6\xf2oYH\xeb\x13\xd5#q\xe0\xdd\xa2\x92\xa9', challenges=challs, combinations=combinations) self.jmsg_to = { 'type': 'challenge', 'sessionID': 'aefoGaavieG9Wihuk2aufai3aeZ5EeW4', 'nonce': '7Nbyb1lI6xPVI3Hg3aKSqQ', 'challenges': challs, 'combinations': combinations, } self.jmsg_from = { 'type': 'challenge', 'sessionID': 'aefoGaavieG9Wihuk2aufai3aeZ5EeW4', 'nonce': '7Nbyb1lI6xPVI3Hg3aKSqQ', 'challenges': [chall.fully_serialize() for chall in challs], 'combinations': [[0, 2], [1, 2]], # TODO array tuples }
def setUp(self): challenges = [ { 'type': 'simpleHttps', 'token': 'IlirfxKKXAsHtmzK29Pj8A' }, { 'type': 'dns', 'token': 'DGyRejmCefe7v4NfDGDKfA' }, { 'type': 'recoveryToken' }, ] combinations = [[0, 2], [1, 2]] from letsencrypt.acme.messages import Challenge self.msg = Challenge( session_id='aefoGaavieG9Wihuk2aufai3aeZ5EeW4', nonce='\xec\xd6\xf2oYH\xeb\x13\xd5#q\xe0\xdd\xa2\x92\xa9', challenges=challenges, combinations=combinations) self.jmsg = { 'type': 'challenge', 'sessionID': 'aefoGaavieG9Wihuk2aufai3aeZ5EeW4', 'nonce': '7Nbyb1lI6xPVI3Hg3aKSqQ', 'challenges': challenges, 'combinations': combinations, }