コード例 #1
0
class RevocationTest(unittest.TestCase):
    """Tests for acme.messages.RevocationTest."""

    def setUp(self):
        from acme.messages import Revocation
        self.rev = Revocation(certificate=CERT)

    def test_from_json_hashable(self):
        from acme.messages import Revocation
        hash(Revocation.from_json(self.rev.to_json()))
コード例 #2
0
class RevocationTest(unittest.TestCase):

    def setUp(self):
        from acme.messages import Revocation
        self.msg = Revocation()
        self.jmsg = {'type': 'revocation'}

    def test_to_partial_json(self):
        self.assertEqual(self.msg.to_partial_json(), self.jmsg)

    def test_from_json(self):
        from acme.messages import Revocation
        self.assertEqual(Revocation.from_json(self.jmsg), self.msg)
コード例 #3
0
ファイル: messages_test.py プロジェクト: rugk/letsencrypt
class RevocationTest(unittest.TestCase):
    """Tests for acme.messages.RevocationTest."""

    def test_url(self):
        from acme.messages import Revocation
        url = 'https://letsencrypt-demo.org/acme/revoke-cert'
        self.assertEqual(url, Revocation.url('https://letsencrypt-demo.org'))
        self.assertEqual(
            url, Revocation.url('https://letsencrypt-demo.org/acme/new-reg'))

    def setUp(self):
        from acme.messages import Revocation
        self.rev = Revocation(certificate=CERT)

    def test_from_json_hashable(self):
        from acme.messages import Revocation
        hash(Revocation.from_json(self.rev.to_json()))
コード例 #4
0
 def test_from_json_hashable(self):
     from acme.messages import Revocation
     hash(Revocation.from_json(self.rev.to_json()))
コード例 #5
0
 def setUp(self):
     from acme.messages import Revocation
     self.rev = Revocation(certificate=CERT)
コード例 #6
0
ファイル: messages_test.py プロジェクト: rugk/letsencrypt
 def test_url(self):
     from acme.messages import Revocation
     url = 'https://letsencrypt-demo.org/acme/revoke-cert'
     self.assertEqual(url, Revocation.url('https://letsencrypt-demo.org'))
     self.assertEqual(
         url, Revocation.url('https://letsencrypt-demo.org/acme/new-reg'))
コード例 #7
0
 def test_from_json(self):
     from acme.messages import Revocation
     self.assertEqual(Revocation.from_json(self.jmsg), self.msg)
コード例 #8
0
 def setUp(self):
     from acme.messages import Revocation
     self.msg = Revocation()
     self.jmsg = {'type': 'revocation'}
コード例 #9
0
ファイル: messages_test.py プロジェクト: kcolford/letsencrypt
 def test_from_json_hashable(self):
     from acme.messages import Revocation
     hash(Revocation.from_json(self.rev.to_json()))
コード例 #10
0
ファイル: messages_test.py プロジェクト: kcolford/letsencrypt
 def setUp(self):
     from acme.messages import Revocation
     self.rev = Revocation(certificate=CERT)
コード例 #11
0
 def test_url(self):
     from acme.messages import Revocation
     url = 'https://letsencrypt-demo.org/acme/revoke-cert'
     self.assertEqual(url, Revocation.url('https://letsencrypt-demo.org'))
     self.assertEqual(
         url, Revocation.url('https://letsencrypt-demo.org/acme/new-reg'))