test_lib : Add helper for connection test
MODIFY
zulip_bots/zulip_bots/test_lib.py
zulip_bots/zulip_bots/test_lib.py
@@ -9,6 +9,7 @@ from zulip_bots.custom_exceptions import (
from zulip_bots.request_test_lib import (
mock_http_conversation,
+ mock_request_exception
)
from zulip_bots.simple_lib import (
@@ -182,6 +183,10 @@ class BotTestCase(TestCase):
http_data = read_bot_fixture_data(self.bot_name, test_name)
return mock_http_conversation(http_data)
+ def mock_request_exception(self):
+ # type: () -> Any
+ return mock_request_exception()
+
def mock_config_info(self, config_info):
# type: (Dict[str, str]) -> Any
return patch('zulip_bots.test_lib.StubBotHandler.get_config_info', return_value=config_info)

test_lib : Add helper for connection test