From 0a05a28e345f9fce7f34cb891a8f61c2b6d069b4 Mon Sep 17 00:00:00 2001 From: Steve Howell Date: Mon, 11 Dec 2017 08:00:02 -0600 Subject: [PATCH] test_virtual_fs.py: Use StubBotTestCase. We use verify_dialog() now, and we also have a different default email. --- .../bots/virtual_fs/test_virtual_fs.py | 28 +++++++++---------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/zulip_bots/zulip_bots/bots/virtual_fs/test_virtual_fs.py b/zulip_bots/zulip_bots/bots/virtual_fs/test_virtual_fs.py index 0ec5e39..3352465 100755 --- a/zulip_bots/zulip_bots/bots/virtual_fs/test_virtual_fs.py +++ b/zulip_bots/zulip_bots/bots/virtual_fs/test_virtual_fs.py @@ -1,8 +1,8 @@ -from zulip_bots.test_lib import BotTestCase +from zulip_bots.test_lib import StubBotTestCase -class TestVirtualFsBot(BotTestCase): +class TestVirtualFsBot(StubBotTestCase): bot_name = "virtual_fs" - help_txt = ('foo_sender@zulip.com:\n\nThis bot implements a virtual file system for a stream.\n' + help_txt = ('foo@example.com:\n\nThis bot implements a virtual file system for a stream.\n' 'The locations of text are persisted for the lifetime of the bot\n' 'running, and if you rename a stream, you will lose the info.\n' 'Example commands:\n\n```\n' @@ -20,23 +20,23 @@ class TestVirtualFsBot(BotTestCase): def test_commands_1(self) -> None: expected = [ - ("cd /home", "foo_sender@zulip.com:\nERROR: invalid path"), - ("mkdir home", "foo_sender@zulip.com:\ndirectory created"), - ("pwd", "foo_sender@zulip.com:\n/"), + ("cd /home", "foo@example.com:\nERROR: invalid path"), + ("mkdir home", "foo@example.com:\ndirectory created"), + ("pwd", "foo@example.com:\n/"), ("help", self.help_txt), - ("help ls", "foo_sender@zulip.com:\nsyntax: ls "), + ("help ls", "foo@example.com:\nsyntax: ls "), ("", self.help_txt), ] - self.check_expected_responses(expected) + self.verify_dialog(expected) def test_commands_2(self) -> None: expected = [ ("help", self.help_txt), - ("help ls", "foo_sender@zulip.com:\nsyntax: ls "), + ("help ls", "foo@example.com:\nsyntax: ls "), ("", self.help_txt), - ("pwd", "foo_sender@zulip.com:\n/"), - ("cd /home", "foo_sender@zulip.com:\nERROR: invalid path"), - ("mkdir home", "foo_sender@zulip.com:\ndirectory created"), - ("cd /home", "foo_sender@zulip.com:\nCurrent path: /home/"), + ("pwd", "foo@example.com:\n/"), + ("cd /home", "foo@example.com:\nERROR: invalid path"), + ("mkdir home", "foo@example.com:\ndirectory created"), + ("cd /home", "foo@example.com:\nCurrent path: /home/"), ] - self.check_expected_responses(expected) + self.verify_dialog(expected)