def test_missing_fields(self):
# Verify missing field check. The exception will list out all missing fields, so by removing
# a single field, we should only be notified of that one missing.
with self.assertRaises(Unauthorized) as context:
t = template.copy()
del t['salt']
validate_gamecenter_token(t)
self.assertIn("The token is missing required fields: salt.", context.exception.description)
评论列表
文章目录