def testBadSubscribePubSubHubbub(self):
raised = False
try:
self.repo.subscribe_to_hub("non-existing-event", "http://requestb.in/1bc1sc61")
except github.GithubException, exception:
raised = True
self.assertEqual(exception.status, 422)
self.assertEqual(exception.data, {"message": "Invalid event: \"non-existing-event\""})
self.assertTrue(raised)
评论列表
文章目录