virtuals_fs: Add test for sample_conversation.

This commit is contained in:
Steve Howell 2018-01-10 12:18:37 -05:00 committed by showell
parent 917bd82019
commit 4b9e3d655f

View file

@ -18,6 +18,16 @@ class TestVirtualFsBot(BotTestCase):
'```\n' '```\n'
'Use commands like `@mention-bot help write` for more details on specific\ncommands.\n') 'Use commands like `@mention-bot help write` for more details on specific\ncommands.\n')
def test_sample_conversation_help(self) -> None:
# There's nothing terribly tricky about the "sample conversation,"
# so we just do a quick sanity check.
reply = self.get_reply_dict('sample_conversation')
content = reply['content']
frag = 'foo@example.com:\ncd /\nCurrent path: /\n\n'
self.assertTrue(content.startswith(frag))
frag = 'read home/stuff/file1\nERROR: file does not exist\n\n'
self.assertIn(frag, content)
def test_commands_1(self) -> None: def test_commands_1(self) -> None:
expected = [ expected = [
("cd /home", "foo@example.com:\nERROR: invalid path"), ("cd /home", "foo@example.com:\nERROR: invalid path"),