def test_default_expiry(self):
        try:
            self.assertEqual(self.context.get_expiry_age(), settings.WECHAT_CONTEXT_AGE)
        except AttributeError:
            self.assertEqual(self.context.get_expiry_age(), DEFAULT_WECHAT_CONTEXT_AGE)

        self.context.set_expiry(0)
        try:
            self.assertEqual(self.context.get_expiry_age(), settings.WECHAT_CONTEXT_AGE)
        except __HOLE__:
            self.assertEqual(self.context.get_expiry_age(), DEFAULT_WECHAT_CONTEXT_AGE)
dataset/ETHPy150Open wechat-python-sdk/wechat-python-sdk/wechat_sdk/context/framework/django/tests.py/ContextTestsMixin.test_default_expiry