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))
Exemplo n.º 2
0
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))
Exemplo n.º 3
0
 def test_from_json_hashable(self):
     from acme.challenges import RecoveryToken
     hash(RecoveryToken.from_json(self.jmsg))
Exemplo n.º 4
0
 def test_from_json(self):
     from acme.challenges import RecoveryToken
     self.assertEqual(self.msg, RecoveryToken.from_json(self.jmsg))
Exemplo n.º 5
0
 def setUp(self):
     from acme.challenges import RecoveryToken
     self.msg = RecoveryToken()
     self.jmsg = {'type': 'recoveryToken'}
 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'}