From 6a089f2217c39d6edc242bd270d6d6ceea847887 Mon Sep 17 00:00:00 2001 From: Viraat Chandra Date: Fri, 29 Dec 2017 19:48:42 +0530 Subject: [PATCH] zulip_bots: Fixed failing tests for Link Shortener Bot. This uses a custom test_bot_responds_to_empty_message() implementation for the link_shortener bot, because it requires mocking config info. --- .../zulip_bots/bots/link_shortener/test_link_shortener.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/zulip_bots/zulip_bots/bots/link_shortener/test_link_shortener.py b/zulip_bots/zulip_bots/bots/link_shortener/test_link_shortener.py index b3cdf72..893024b 100644 --- a/zulip_bots/zulip_bots/bots/link_shortener/test_link_shortener.py +++ b/zulip_bots/zulip_bots/bots/link_shortener/test_link_shortener.py @@ -7,6 +7,9 @@ class TestLinkShortenerBot(BotTestCase): with self.mock_config_info({'key': 'qwertyuiop'}): self.verify_reply(message, response) + def test_bot_responds_to_empty_message(self) -> None: + self._test('', 'No links found. Send "help" to see usage instructions.') + def test_normal(self) -> None: with self.mock_http_conversation('test_normal'): self._test('Shorten https://www.github.com/zulip/zulip please.',