bot tests: Use StubBotTestCase for helloworld bot.
This commit is contained in:
parent
4ede1a5564
commit
c02e141f7f
|
@ -1,16 +1,15 @@
|
||||||
#!/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 TestHelloWorldBot(BotTestCase):
|
|
||||||
bot_name = "helloworld"
|
bot_name = "helloworld"
|
||||||
|
|
||||||
def test_bot(self):
|
def test_bot(self):
|
||||||
txt = "beep boop"
|
dialog = [
|
||||||
messages = ["", "foo", "Hi, my name is abc"]
|
('', 'beep boop'),
|
||||||
self.check_expected_responses(list(zip(messages, len(messages)*[txt])))
|
('help', 'beep boop'),
|
||||||
|
('foo', 'beep boop'),
|
||||||
|
]
|
||||||
|
|
||||||
|
self.verify_dialog(dialog)
|
||||||
|
|
Loading…
Reference in a new issue