From c02e141f7f1e2fe2928b2cdf4307a760b48cf907 Mon Sep 17 00:00:00 2001 From: Steve Howell Date: Thu, 30 Nov 2017 13:24:56 -0800 Subject: [PATCH] bot tests: Use StubBotTestCase for helloworld bot. --- .../bots/helloworld/test_helloworld.py | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/zulip_bots/zulip_bots/bots/helloworld/test_helloworld.py b/zulip_bots/zulip_bots/bots/helloworld/test_helloworld.py index 54ef547..d4251de 100755 --- a/zulip_bots/zulip_bots/bots/helloworld/test_helloworld.py +++ b/zulip_bots/zulip_bots/bots/helloworld/test_helloworld.py @@ -1,16 +1,15 @@ #!/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 TestHelloWorldBot(BotTestCase): +class TestHelpBot(StubBotTestCase): bot_name = "helloworld" def test_bot(self): - txt = "beep boop" - messages = ["", "foo", "Hi, my name is abc"] - self.check_expected_responses(list(zip(messages, len(messages)*[txt]))) + dialog = [ + ('', 'beep boop'), + ('help', 'beep boop'), + ('foo', 'beep boop'), + ] + + self.verify_dialog(dialog)