コード例 #1
0
ファイル: challenges_test.py プロジェクト: yuma-m/certbot
    def setUp(self):
        from acme.challenges import HTTP01Response
        self.msg = HTTP01Response(key_authorization=u'foo')
        self.jmsg = {
            'resource': 'challenge',
            'type': 'http-01',
            'keyAuthorization': u'foo',
        }

        from acme.challenges import HTTP01
        self.chall = HTTP01(token=(b'x' * 16))
        self.response = self.chall.response(KEY)
コード例 #2
0
 def test_from_json_hashable(self):
     from acme.challenges import HTTP01
     hash(HTTP01.from_json(self.jmsg))
コード例 #3
0
 def test_from_json(self):
     from acme.challenges import HTTP01
     self.assertEqual(self.msg, HTTP01.from_json(self.jmsg))
コード例 #4
0
 def test_from_json_hashable(self):
     from acme.challenges import HTTP01
     hash(HTTP01.from_json(self.jmsg))
コード例 #5
0
 def test_from_json(self):
     from acme.challenges import HTTP01
     self.assertEqual(self.msg, HTTP01.from_json(self.jmsg))