mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-22 05:14:59 +00:00
fix: update test_get_command_completions to handle matching_commands return value
This commit is contained in:
parent
6687a24547
commit
d2bc24cb18
1 changed files with 2 additions and 0 deletions
|
@ -169,6 +169,7 @@ 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)
|
||||
|
||||
autocompleter = AutoCompleter(root, rel_fnames, addable_rel_fnames, commands, "utf-8")
|
||||
|
||||
|
@ -176,6 +177,7 @@ class TestInputOutput(unittest.TestCase):
|
|||
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.matching_commands.assert_called_once_with("/model")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue