MCPcopy Index your code
hub / github.com/PyGithub/PyGithub / testBadSubscribePubSubHubbub

Method testBadSubscribePubSubHubbub

tests/Repository.py:2078–2083  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

2076 self.repo.subscribe_to_hub("push", "http://requestb.in/1bc1sc61", "my_secret")
2077
2078 def testBadSubscribePubSubHubbub(self):
2079 with self.assertRaises(github.GithubException) as raisedexp:
2080 self.repo.subscribe_to_hub("non-existing-event", "http://requestb.in/1bc1sc61")
2081 self.assertEqual(raisedexp.exception.message, 'Invalid event: "non-existing-event"')
2082 self.assertEqual(raisedexp.exception.status, 422)
2083 self.assertEqual(raisedexp.exception.data, {"message": 'Invalid event: "non-existing-event"'})
2084
2085 def testUnsubscribePubSubHubbub(self):
2086 self.repo.unsubscribe_from_hub("push", "http://requestb.in/1bc1sc61")

Callers

nothing calls this directly

Calls 1

subscribe_to_hubMethod · 0.80

Tested by

no test coverage detected