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.
This commit is contained in:
Viraat Chandra 2017-12-29 19:48:42 +05:30 committed by Robert Hönig
parent db0e88a1b9
commit 6a089f2217

View file

@ -7,6 +7,9 @@ class TestLinkShortenerBot(BotTestCase):
with self.mock_config_info({'key': 'qwertyuiop'}): with self.mock_config_info({'key': 'qwertyuiop'}):
self.verify_reply(message, response) 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: def test_normal(self) -> None:
with self.mock_http_conversation('test_normal'): with self.mock_http_conversation('test_normal'):
self._test('Shorten https://www.github.com/zulip/zulip please.', self._test('Shorten https://www.github.com/zulip/zulip please.',