minor: Clean up test_converter.py.
This removes some imports and uses StubBotTestCase and verify_dialog.
This commit is contained in:
parent
6f0d5239e8
commit
2c42b0e42e
|
@ -1,15 +1,12 @@
|
||||||
#!/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 zulip_bots.test_lib import BotTestCase
|
class TestConverterBot(StubBotTestCase):
|
||||||
|
|
||||||
class TestConverterBot(BotTestCase):
|
|
||||||
bot_name = "converter"
|
bot_name = "converter"
|
||||||
|
|
||||||
def test_bot(self):
|
def test_bot(self):
|
||||||
expected = [
|
dialog = [
|
||||||
("", 'Too few arguments given. Enter `@convert help` '
|
("", 'Too few arguments given. Enter `@convert help` '
|
||||||
'for help on using the converter.\n'),
|
'for help on using the converter.\n'),
|
||||||
("foo bar", 'Too few arguments given. Enter `@convert help` '
|
("foo bar", 'Too few arguments given. Enter `@convert help` '
|
||||||
|
@ -19,4 +16,4 @@ class TestConverterBot(BotTestCase):
|
||||||
("0.002 kilometer millimile", "0.002 kilometer = 1.2427424 millimile\n"),
|
("0.002 kilometer millimile", "0.002 kilometer = 1.2427424 millimile\n"),
|
||||||
("3 megabyte kilobit", "3.0 megabyte = 24576.0 kilobit\n"),
|
("3 megabyte kilobit", "3.0 megabyte = 24576.0 kilobit\n"),
|
||||||
]
|
]
|
||||||
self.check_expected_responses(expected)
|
self.verify_dialog(dialog)
|
||||||
|
|
Loading…
Reference in a new issue