コード例 #1
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))
コード例 #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))
コード例 #3
0
 def test_from_json_hashable(self):
     from acme.challenges import RecoveryToken
     hash(RecoveryToken.from_json(self.jmsg))
コード例 #4
0
 def test_from_json(self):
     from acme.challenges import RecoveryToken
     self.assertEqual(self.msg, RecoveryToken.from_json(self.jmsg))
コード例 #5
0
 def setUp(self):
     from acme.challenges import RecoveryToken
     self.msg = RecoveryToken()
     self.jmsg = {'type': 'recoveryToken'}
コード例 #6
0
 def test_from_json_hashable(self):
     from acme.challenges import RecoveryToken
     hash(RecoveryToken.from_json(self.jmsg))
コード例 #7
0
 def test_from_json(self):
     from acme.challenges import RecoveryToken
     self.assertEqual(self.msg, RecoveryToken.from_json(self.jmsg))
コード例 #8
0
 def setUp(self):
     from acme.challenges import RecoveryToken
     self.msg = RecoveryToken()
     self.jmsg = {'type': 'recoveryToken'}