mypy: zulip_bots: Annotate zulip_bots/test_run.py.

This commit is contained in:
Alena Volkova 2017-10-11 20:18:16 -04:00
parent afb9886553
commit 5e7f4c595f
2 changed files with 2 additions and 1 deletions

View file

@ -22,7 +22,6 @@ exclude = """
zulip/integrations/perforce/git_p4.py zulip/integrations/perforce/git_p4.py
zulip_bots/zulip_bots/bots zulip_bots/zulip_bots/bots
zulip_bots/zulip_bots/test_run.py
zulip_bots/zulip_bots/zulip_bot_output.py zulip_bots/zulip_bots/zulip_bot_output.py
zulip_botserver/tests/__init__.py zulip_botserver/tests/__init__.py

View file

@ -26,6 +26,7 @@ class TestDefaultArguments(TestCase):
@patch('sys.argv', ['zulip-run-bot', 'giphy', '--config-file', '/foo/bar/baz.conf']) @patch('sys.argv', ['zulip-run-bot', 'giphy', '--config-file', '/foo/bar/baz.conf'])
@patch('zulip_bots.run.run_message_handler_for_bot') @patch('zulip_bots.run.run_message_handler_for_bot')
def test_argument_parsing_with_bot_name(self, mock_run_message_handler_for_bot): def test_argument_parsing_with_bot_name(self, mock_run_message_handler_for_bot):
# type: (mock.Mock) -> None
zulip_bots.run.main() zulip_bots.run.main()
mock_run_message_handler_for_bot.assert_called_with(bot_name='giphy', mock_run_message_handler_for_bot.assert_called_with(bot_name='giphy',
config_file='/foo/bar/baz.conf', config_file='/foo/bar/baz.conf',
@ -35,6 +36,7 @@ class TestDefaultArguments(TestCase):
@patch('sys.argv', ['zulip-run-bot', path_to_bot, '--config-file', '/foo/bar/baz.conf']) @patch('sys.argv', ['zulip-run-bot', path_to_bot, '--config-file', '/foo/bar/baz.conf'])
@patch('zulip_bots.run.run_message_handler_for_bot') @patch('zulip_bots.run.run_message_handler_for_bot')
def test_argument_parsing_with_bot_path(self, mock_run_message_handler_for_bot): def test_argument_parsing_with_bot_path(self, mock_run_message_handler_for_bot):
# type: (mock.Mock) -> None
zulip_bots.run.main() zulip_bots.run.main()
mock_run_message_handler_for_bot.assert_called_with( mock_run_message_handler_for_bot.assert_called_with(
bot_name='giphy', bot_name='giphy',