def setUp(self):
     from letsencrypt.acme.challenges import DNS
     self.msg = DNS(token='17817c66b60ce2e4012dfad92657527a')
     self.jmsg = {
         'type': 'dns',
         'token': '17817c66b60ce2e4012dfad92657527a'
     }
Ejemplo n.º 2
0
class DNSTest(unittest.TestCase):

    def setUp(self):
        from letsencrypt.acme.challenges import DNS
        self.msg = DNS(token='17817c66b60ce2e4012dfad92657527a')
        self.jmsg = {'type': 'dns', 'token': '17817c66b60ce2e4012dfad92657527a'}

    def test_to_json(self):
        self.assertEqual(self.jmsg, self.msg.to_json())

    def test_from_json(self):
        from letsencrypt.acme.challenges import DNS
        self.assertEqual(self.msg, DNS.from_json(self.jmsg))
class DNSTest(unittest.TestCase):
    def setUp(self):
        from letsencrypt.acme.challenges import DNS
        self.msg = DNS(token='17817c66b60ce2e4012dfad92657527a')
        self.jmsg = {
            'type': 'dns',
            'token': '17817c66b60ce2e4012dfad92657527a'
        }

    def test_to_json(self):
        self.assertEqual(self.jmsg, self.msg.to_json())

    def test_from_json(self):
        from letsencrypt.acme.challenges import DNS
        self.assertEqual(self.msg, DNS.from_json(self.jmsg))
 def test_from_json_hashable(self):
     from letsencrypt.acme.challenges import DNS
     hash(DNS.from_json(self.jmsg))
 def test_from_json(self):
     from letsencrypt.acme.challenges import DNS
     self.assertEqual(self.msg, DNS.from_json(self.jmsg))
 def setUp(self):
     from letsencrypt.acme.challenges import DNS
     self.msg = DNS(token='17817c66b60ce2e4012dfad92657527a')
     self.jmsg = {'type': 'dns', 'token': '17817c66b60ce2e4012dfad92657527a'}
 def test_from_json(self):
     from letsencrypt.acme.challenges import DNS
     self.assertEqual(self.msg, DNS.from_json(self.jmsg))
 def test_from_json_hashable(self):
     from letsencrypt.acme.challenges import DNS
     hash(DNS.from_json(self.jmsg))