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