From db08586df6c7167c9e3f81960b7e649dd93b9d43 Mon Sep 17 00:00:00 2001 From: Steve Howell Date: Fri, 1 Dec 2017 12:49:40 -0800 Subject: [PATCH] Promote mock_http_conversations to its superclass. --- zulip_bots/zulip_bots/test_lib.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) 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,