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
评论列表
文章目录