mirror of
https://github.com/zulip/zulip.git
synced 2025-11-04 14:03:30 +00:00
webhooks/github: Be more explicit about unsupported PR events.
This was technically a bug. For events that aren't unsupported intentionally, the control should fall to the line that raises UnknownWebhookEventType, and shouldn't be handled by anything else. The events that are intentionally unsupported should be handled more explicitly.
This commit is contained in:
@@ -224,14 +224,6 @@ class GithubWebhookTest(WebhookTestCase):
|
||||
self.assertFalse(check_send_webhook_message_mock.called)
|
||||
self.assert_json_success(result)
|
||||
|
||||
@patch('zerver.webhooks.github.view.check_send_webhook_message')
|
||||
def test_pull_request_request_review_ignore(
|
||||
self, check_send_webhook_message_mock: MagicMock) -> None:
|
||||
payload = self.get_body('request_review_pull_request')
|
||||
result = self.client_post(self.url, payload, HTTP_X_GITHUB_EVENT='pull_request', content_type="application/json")
|
||||
self.assertFalse(check_send_webhook_message_mock.called)
|
||||
self.assert_json_success(result)
|
||||
|
||||
@patch('zerver.webhooks.github.view.check_send_webhook_message')
|
||||
def test_pull_request_request_review_remove_ignore(
|
||||
self, check_send_webhook_message_mock: MagicMock) -> None:
|
||||
|
||||
Reference in New Issue
Block a user