bot tests: Use StubBotTestCase for help bot.

This commit is contained in:
Steve Howell 2017-11-30 13:06:26 -08:00 committed by showell
parent 6087cf95e2
commit 4ede1a5564

View file

@ -1,16 +1,17 @@
#!/usr/bin/env python #!/usr/bin/env python
from __future__ import absolute_import from zulip_bots.test_lib import StubBotTestCase
from __future__ import print_function
from six.moves import zip class TestHelpBot(StubBotTestCase):
from zulip_bots.test_lib import BotTestCase
class TestHelpBot(BotTestCase):
bot_name = "help" bot_name = "help"
def test_bot(self): def test_bot(self):
txt = "Info on Zulip can be found here:\nhttps://github.com/zulip/zulip" help_text = "Info on Zulip can be found here:\nhttps://github.com/zulip/zulip"
messages = ["", "help", "Hi, my name is abc"] requests = ["", "help", "Hi, my name is abc"]
self.check_expected_responses(list(zip(messages, len(messages)*[txt])))
dialog = [
(request, help_text)
for request in requests
]
self.verify_dialog(dialog)