From e11cd8ecbb299a9d1c11b00706a37c4885e491cb Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Wed, 28 Aug 2024 16:03:40 -0700 Subject: [PATCH] test: update AutoCompleter test for command matching --- tests/basic/test_io.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/basic/test_io.py b/tests/basic/test_io.py index bbc467db5..ad9293ba5 100644 --- a/tests/basic/test_io.py +++ b/tests/basic/test_io.py @@ -169,14 +169,14 @@ class TestInputOutput(unittest.TestCase): commands = MagicMock() commands.get_commands.return_value = ["model", "chat", "help"] commands.get_completions.return_value = ["gpt-3.5-turbo", "gpt-4"] - commands.matching_commands.return_value = (["model"], None, None) + commands.matching_commands.return_value = (["/model", "/models"], None, None) autocompleter = AutoCompleter(root, rel_fnames, addable_rel_fnames, commands, "utf-8") # Test case for "/model gpt" result = autocompleter.get_command_completions("/model gpt", ["/model", "gpt"]) self.assertEqual(result, ["gpt-3.5-turbo", "gpt-4"]) - commands.get_completions.assert_called_once_with("model") + commands.get_completions.assert_called_once_with("/model") commands.matching_commands.assert_called_once_with("/model")