diff --git a/zulip_bots/zulip_bots/test_lib.py b/zulip_bots/zulip_bots/test_lib.py index 96c29eb..7b39003 100755 --- a/zulip_bots/zulip_bots/test_lib.py +++ b/zulip_bots/zulip_bots/test_lib.py @@ -107,6 +107,12 @@ class StubBotTestCase(TestCase): bot = get_bot_message_handler(self.bot_name) self.assertNotEqual(bot.usage(), '') + def mock_http_conversation(self, test_name): + # type: (str) -> Any + assert test_name is not None + http_data = read_bot_fixture_data(self.bot_name, test_name) + return mock_http_conversation(http_data) + def get_bot_message_handler(bot_name): # type: (str) -> Any # message_handler is of type 'Any', since it can contain any bot's @@ -258,12 +264,6 @@ class BotTestCase(StubBotTestCase): yield self.mock_bot_handler.get_config_info.return_value = None - def mock_http_conversation(self, test_name): - # type: (str) -> Any - assert test_name is not None - http_data = read_bot_fixture_data(self.bot_name, test_name) - return mock_http_conversation(http_data) - def assert_bot_response(self, message, response, expected_method): # type: (Dict[str, Any], Dict[str, Any], str) -> None # Strictly speaking, this function is not needed anymore,