mypy: Use Python 3 syntax for typing in beanstalk/tests.py

This commit is contained in:
Patrick Grave 2017-12-11 09:59:25 +11:00 committed by Tim Abbott
parent f2b322c32d
commit a2ed76c383

View File

@ -98,8 +98,7 @@ class BeanstalkHookTests(WebhookTestCase):
@patch('zerver.webhooks.beanstalk.view.check_send_stream_message')
def test_git_multiple_committers_filtered_by_branches_ignore(
self, check_send_stream_message_mock):
# type: (MagicMock) -> None
self, check_send_stream_message_mock: MagicMock) -> None:
self.url = self.build_webhook_url(branches='changes,development')
payload = self.get_body('git_multiple_committers')
result = self.api_post(self.TEST_USER_EMAIL, self.url, payload)
@ -108,8 +107,7 @@ class BeanstalkHookTests(WebhookTestCase):
@patch('zerver.webhooks.beanstalk.view.check_send_stream_message')
def test_git_multiple_filtered_by_branches_ignore(
self, check_send_stream_message_mock):
# type: (MagicMock) -> None
self, check_send_stream_message_mock: MagicMock) -> None:
self.url = self.build_webhook_url(branches='changes,development')
payload = self.get_body('git_multiple')
result = self.api_post(self.TEST_USER_EMAIL, self.url, payload)
@ -118,8 +116,7 @@ class BeanstalkHookTests(WebhookTestCase):
@patch('zerver.webhooks.beanstalk.view.check_send_stream_message')
def test_git_more_than_limit_filtered_by_branches_ignore(
self, check_send_stream_message_mock):
# type: (MagicMock) -> None
self, check_send_stream_message_mock: MagicMock) -> None:
self.url = self.build_webhook_url(branches='changes,development')
payload = self.get_body('git_morethanlimitcommits')
result = self.api_post(self.TEST_USER_EMAIL, self.url, payload)