@@ -43,7 +43,7 @@ async def test_async_main_ioerror(monkeypatch):
4343 "vectorcode.main.parse_cli_args" , AsyncMock (return_value = mock_cli_args )
4444 )
4545 monkeypatch .setattr (
46- "vectorcode.main.get_project_config " ,
46+ "vectorcode.main.load_config_file " ,
4747 AsyncMock (side_effect = IOError ("Test Error" )),
4848 )
4949
@@ -62,7 +62,7 @@ async def test_async_main_cli_action_check(monkeypatch):
6262 mock_check = AsyncMock (return_value = 0 )
6363 monkeypatch .setattr ("vectorcode.subcommands.check" , mock_check )
6464 monkeypatch .setattr (
65- "vectorcode.main.get_project_config " ,
65+ "vectorcode.main.load_config_file " ,
6666 AsyncMock (return_value = MagicMock (merge_from = AsyncMock ())),
6767 )
6868
@@ -79,7 +79,7 @@ async def test_async_main_cli_action_init(monkeypatch):
7979 )
8080 mock_init = AsyncMock (return_value = 0 )
8181 monkeypatch .setattr ("vectorcode.subcommands.init" , mock_init )
82- monkeypatch .setattr ("vectorcode.main.get_project_config " , AsyncMock ())
82+ monkeypatch .setattr ("vectorcode.main.load_config_file " , AsyncMock ())
8383
8484 return_code = await async_main ()
8585 assert return_code == 0
@@ -95,7 +95,7 @@ async def test_async_main_cli_action_chunks(monkeypatch):
9595 mock_chunks = AsyncMock (return_value = 0 )
9696 monkeypatch .setattr ("vectorcode.subcommands.chunks" , mock_chunks )
9797 monkeypatch .setattr (
98- "vectorcode.main.get_project_config " , AsyncMock (return_value = Config ())
98+ "vectorcode.main.load_config_file " , AsyncMock (return_value = Config ())
9999 )
100100 monkeypatch .setattr ("vectorcode.common.try_server" , AsyncMock (return_value = True ))
101101
@@ -126,7 +126,7 @@ async def test_async_main_cli_action_prompts(monkeypatch):
126126 mock_prompts = MagicMock (return_value = 0 )
127127 monkeypatch .setattr ("vectorcode.subcommands.prompts" , mock_prompts )
128128 monkeypatch .setattr (
129- "vectorcode.main.get_project_config " , AsyncMock (return_value = Config ())
129+ "vectorcode.main.load_config_file " , AsyncMock (return_value = Config ())
130130 )
131131
132132 return_code = await async_main ()
@@ -144,7 +144,7 @@ async def test_async_main_cli_action_query(monkeypatch):
144144 db_url = "http://test_host:1234" , action = CliAction .query , pipe = False
145145 )
146146 monkeypatch .setattr (
147- "vectorcode.main.get_project_config " ,
147+ "vectorcode.main.load_config_file " ,
148148 AsyncMock (
149149 return_value = AsyncMock (
150150 merge_from = AsyncMock (return_value = mock_final_configs )
@@ -175,7 +175,7 @@ async def test_async_main_cli_action_vectorise(monkeypatch):
175175 db_url = "http://test_host:1234" , action = CliAction .vectorise , include_hidden = True
176176 )
177177 monkeypatch .setattr (
178- "vectorcode.main.get_project_config " ,
178+ "vectorcode.main.load_config_file " ,
179179 AsyncMock (
180180 return_value = AsyncMock (
181181 merge_from = AsyncMock (return_value = mock_final_configs )
@@ -199,7 +199,7 @@ async def test_async_main_cli_action_drop(monkeypatch):
199199 )
200200 mock_final_configs = Config (db_url = "http://test_host:1234" , action = CliAction .drop )
201201 monkeypatch .setattr (
202- "vectorcode.main.get_project_config " ,
202+ "vectorcode.main.load_config_file " ,
203203 AsyncMock (
204204 return_value = AsyncMock (
205205 merge_from = AsyncMock (return_value = mock_final_configs )
@@ -223,7 +223,7 @@ async def test_async_main_cli_action_ls(monkeypatch):
223223 )
224224 mock_final_configs = Config (db_url = "http://test_host:1234" , action = CliAction .ls )
225225 monkeypatch .setattr (
226- "vectorcode.main.get_project_config " ,
226+ "vectorcode.main.load_config_file " ,
227227 AsyncMock (
228228 return_value = AsyncMock (
229229 merge_from = AsyncMock (return_value = mock_final_configs )
@@ -259,7 +259,7 @@ async def test_async_main_cli_action_update(monkeypatch):
259259 )
260260 mock_final_configs = Config (db_url = "http://test_host:1234" , action = CliAction .update )
261261 monkeypatch .setattr (
262- "vectorcode.main.get_project_config " ,
262+ "vectorcode.main.load_config_file " ,
263263 AsyncMock (
264264 return_value = AsyncMock (
265265 merge_from = AsyncMock (return_value = mock_final_configs )
@@ -283,7 +283,7 @@ async def test_async_main_cli_action_clean(monkeypatch):
283283 )
284284 mock_final_configs = Config (db_url = "http://test_host:1234" , action = CliAction .clean )
285285 monkeypatch .setattr (
286- "vectorcode.main.get_project_config " ,
286+ "vectorcode.main.load_config_file " ,
287287 AsyncMock (
288288 return_value = AsyncMock (
289289 merge_from = AsyncMock (return_value = mock_final_configs )
@@ -307,7 +307,7 @@ async def test_async_main_exception_handling(monkeypatch):
307307 )
308308 mock_final_configs = Config (db_url = "http://test_host:1234" , action = CliAction .query )
309309 monkeypatch .setattr (
310- "vectorcode.main.get_project_config " ,
310+ "vectorcode.main.load_config_file " ,
311311 AsyncMock (
312312 return_value = AsyncMock (
313313 merge_from = AsyncMock (return_value = mock_final_configs )
0 commit comments