summaryrefslogtreecommitdiff
path: root/tests/context_test.py
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--tests/context_test.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/context_test.py b/tests/context_test.py
index 869215d..1e179f1 100644
--- a/tests/context_test.py
+++ b/tests/context_test.py
@@ -1,7 +1,7 @@
-import vim
from context import make_ai_context, make_prompt
default_config = {
+ "engine": "chat",
"options": {
"model": "gpt-4o",
"endpoint_url": "https://api.openai.com/v1/chat/completions",
@@ -81,6 +81,7 @@ def test_role_config_different_commands():
assert 'preset_tab' == actual_config['ui']['open_chat_command']
assert 'hello' == actual_prompt
assert 'https://localhost/chat' == actual_config['options']['endpoint_url']
+ assert 'chat' == actual_config['engine']
context = make_ai_context({ **base, 'command_type': 'complete' })
actual_config = context['config']
@@ -89,6 +90,7 @@ def test_role_config_different_commands():
assert '0' == actual_config['ui']['paste_mode']
assert 'hello' == actual_prompt
assert 'https://localhost/complete' == actual_config['options']['endpoint_url']
+ assert 'complete' == actual_config['engine']
context = make_ai_context({ **base, 'command_type': 'edit' })
actual_config = context['config']
@@ -97,6 +99,7 @@ def test_role_config_different_commands():
assert '0' == actual_config['ui']['paste_mode']
assert 'hello' == actual_prompt
assert 'https://localhost/edit' == actual_config['options']['endpoint_url']
+ assert 'complete' == actual_config['engine']
def test_multiple_role_configs():
context = make_ai_context({