test_gamecenter.py 文件源码

python
阅读 20 收藏 0 点赞 0 评论 0

项目:drift 作者: dgnorth 项目源码 文件源码
def test_cert_validation(self):
        # Make sure cert is issued to a trusted organization.
        _tmp = TRUSTED_ORGANIZATIONS[:]
        TRUSTED_ORGANIZATIONS[:] = ['Mordor Inc.']
        try:
            with self.assertRaises(Unauthorized) as context:
                validate_gamecenter_token(template)
            self.assertIn("Certificate is issued to 'Apple Inc.' which is not one of ['Mordor Inc.'].", context.exception.description)
        finally:
            TRUSTED_ORGANIZATIONS[:] = _tmp
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号