From 4ede1a5564f31d5147637d4f069650cea9a4e182 Mon Sep 17 00:00:00 2001 From: Steve Howell Date: Thu, 30 Nov 2017 13:06:26 -0800 Subject: [PATCH] bot tests: Use StubBotTestCase for help bot. --- zulip_bots/zulip_bots/bots/help/test_help.py | 21 ++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/zulip_bots/zulip_bots/bots/help/test_help.py b/zulip_bots/zulip_bots/bots/help/test_help.py index ef737bc..5ce8a7d 100755 --- a/zulip_bots/zulip_bots/bots/help/test_help.py +++ b/zulip_bots/zulip_bots/bots/help/test_help.py @@ -1,16 +1,17 @@ #!/usr/bin/env python -from __future__ import absolute_import -from __future__ import print_function +from zulip_bots.test_lib import StubBotTestCase -from six.moves import zip - -from zulip_bots.test_lib import BotTestCase - -class TestHelpBot(BotTestCase): +class TestHelpBot(StubBotTestCase): bot_name = "help" def test_bot(self): - txt = "Info on Zulip can be found here:\nhttps://github.com/zulip/zulip" - messages = ["", "help", "Hi, my name is abc"] - self.check_expected_responses(list(zip(messages, len(messages)*[txt]))) + help_text = "Info on Zulip can be found here:\nhttps://github.com/zulip/zulip" + requests = ["", "help", "Hi, my name is abc"] + + dialog = [ + (request, help_text) + for request in requests + ] + + self.verify_dialog(dialog)