class RecoveryTokenTest(unittest.TestCase): def setUp(self): from letsencrypt.acme.challenges import RecoveryToken self.msg = RecoveryToken() self.jmsg = {'type': 'recoveryToken'} def test_to_json(self): self.assertEqual(self.jmsg, self.msg.to_json()) def test_from_json(self): from letsencrypt.acme.challenges import RecoveryToken self.assertEqual(self.msg, RecoveryToken.from_json(self.jmsg))
def test_from_json_hashable(self): from letsencrypt.acme.challenges import RecoveryToken hash(RecoveryToken.from_json(self.jmsg))
def test_from_json(self): from letsencrypt.acme.challenges import RecoveryToken self.assertEqual(self.msg, RecoveryToken.from_json(self.jmsg))
def setUp(self): from letsencrypt.acme.challenges import RecoveryToken self.msg = RecoveryToken() self.jmsg = {'type': 'recoveryToken'}