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()))
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)
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()))
def test_from_json_hashable(self): from acme.messages import Revocation hash(Revocation.from_json(self.rev.to_json()))
def setUp(self): from acme.messages import Revocation self.rev = Revocation(certificate=CERT)
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 test_from_json(self): from acme.messages import Revocation self.assertEqual(Revocation.from_json(self.jmsg), self.msg)
def setUp(self): from acme.messages import Revocation self.msg = Revocation() self.jmsg = {'type': 'revocation'}