File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -26,8 +26,9 @@ def test_get_api_key_claude(self):
2626 @patch .dict (os .environ , {}, clear = True )
2727 @patch ('sys.stderr' )
2828 def test_get_api_key_not_found (self , mock_stderr ):
29+ # When no API key is set, falls back to Ollama local mode
2930 api_key = self .cli ._get_api_key ()
30- self .assertIsNone (api_key )
31+ self .assertEqual (api_key , 'ollama-local' )
3132
3233 @patch .dict (os .environ , {'OPENAI_API_KEY' : 'sk-test-openai-key-123' })
3334 def test_get_provider_openai (self ):
@@ -169,8 +170,9 @@ def test_install_unexpected_error(self, mock_interpreter_class):
169170
170171 @patch ('sys.argv' , ['cortex' ])
171172 def test_main_no_command (self ):
173+ # Running cortex with no command shows help and returns 0 (success)
172174 result = main ()
173- self .assertEqual (result , 1 )
175+ self .assertEqual (result , 0 )
174176
175177 @patch ('sys.argv' , ['cortex' , 'install' , 'docker' ])
176178 @patch ('cortex.cli.CortexCLI.install' )
You can’t perform that action at this time.
0 commit comments