bots: Move import_module_from_source to finder.py.

This commit is contained in:
Sivagiri Visakan 2018-05-22 01:03:43 +05:30 committed by showell
parent 36566c26c1
commit d053528925
4 changed files with 27 additions and 28 deletions

View file

@ -59,7 +59,7 @@ class TestDefaultArguments(TestCase):
def _test_adding_bot_parent_dir_to_sys_path(self, bot_qualifier, bot_dir_path):
# type: (str, str) -> None
with patch('sys.argv', ['zulip-run-bot', bot_qualifier, '--config-file', '/path/to/config']):
with patch('zulip_bots.run.import_module_from_source', return_value=mock.Mock()):
with patch('zulip_bots.finder.import_module_from_source', return_value=mock.Mock()):
with patch('zulip_bots.run.run_message_handler_for_bot'):
with patch('zulip_bots.run.exit_gracefully_if_zulip_config_file_does_not_exist'):
zulip_bots.run.main()