@@ -229,7 +229,7 @@ def base_patches(test_paths, mock_truediv, debug_helper):
229229 patch ("pathlib.Path.iterdir" , return_value = []), # Mock empty directory listing
230230 patch ("json.dump" ),
231231 patch ("pathlib.Path.touch" ),
232- patch ("vec_inf.shared ._utils.Path" , return_value = test_paths ["weights_dir" ]),
232+ patch ("vec_inf.client ._utils.Path" , return_value = test_paths ["weights_dir" ]),
233233 patch (
234234 "pathlib.Path.home" , return_value = Path ("/home/user" )
235235 ), # Mock home directory
@@ -251,7 +251,7 @@ def test_launch_command_success(runner, mock_launch_output, path_exists, debug_h
251251 test_log_dir = Path ("/tmp/test_vec_inf_logs" )
252252
253253 with (
254- patch ("vec_inf.shared ._utils.run_bash_command" ) as mock_run ,
254+ patch ("vec_inf.client ._utils.run_bash_command" ) as mock_run ,
255255 patch ("pathlib.Path.mkdir" ),
256256 patch ("builtins.open" , debug_helper .tracked_mock_open ),
257257 patch ("pathlib.Path.open" , debug_helper .tracked_mock_open ),
@@ -282,7 +282,7 @@ def test_launch_command_with_json_output(
282282 """Test JSON output format for launch command."""
283283 test_log_dir = Path ("/tmp/test_vec_inf_logs" )
284284 with (
285- patch ("vec_inf.shared ._utils.run_bash_command" ) as mock_run ,
285+ patch ("vec_inf.client ._utils.run_bash_command" ) as mock_run ,
286286 patch ("pathlib.Path.mkdir" ),
287287 patch ("builtins.open" , debug_helper .tracked_mock_open ),
288288 patch ("pathlib.Path.open" , debug_helper .tracked_mock_open ),
@@ -340,7 +340,7 @@ def test_launch_command_model_not_in_config_with_weights(
340340 for patch_obj in base_patches :
341341 stack .enter_context (patch_obj )
342342 # Apply specific patches for this test
343- mock_run = stack .enter_context (patch ("vec_inf.shared ._utils.run_bash_command" ))
343+ mock_run = stack .enter_context (patch ("vec_inf.client ._utils.run_bash_command" ))
344344 stack .enter_context (patch ("pathlib.Path.exists" , new = custom_path_exists ))
345345
346346 expected_job_id = "14933051"
@@ -381,7 +381,7 @@ def custom_path_exists(p):
381381
382382 # Mock Path to return the weights dir path
383383 stack .enter_context (
384- patch ("vec_inf.shared ._utils.Path" , return_value = test_paths ["weights_dir" ])
384+ patch ("vec_inf.client ._utils.Path" , return_value = test_paths ["weights_dir" ])
385385 )
386386
387387 result = runner .invoke (cli , ["launch" , "unknown-model" ])
@@ -417,9 +417,9 @@ def test_metrics_command_pending_server(
417417):
418418 """Test metrics command when server is pending."""
419419 with (
420- patch ("vec_inf.shared ._utils.run_bash_command" ) as mock_run ,
420+ patch ("vec_inf.client ._utils.run_bash_command" ) as mock_run ,
421421 patch ("pathlib.Path.exists" , new = path_exists ),
422- patch ("vec_inf.shared ._utils.get_base_url" , return_value = "URL NOT FOUND" ),
422+ patch ("vec_inf.client ._utils.get_base_url" , return_value = "URL NOT FOUND" ),
423423 ):
424424 job_id = 12345
425425 mock_run .return_value = (mock_status_output (job_id , "PENDING" ), "" )
@@ -441,9 +441,9 @@ def test_metrics_command_server_not_ready(
441441):
442442 """Test metrics command when server is running but not ready."""
443443 with (
444- patch ("vec_inf.shared ._utils.run_bash_command" ) as mock_run ,
444+ patch ("vec_inf.client ._utils.run_bash_command" ) as mock_run ,
445445 patch ("pathlib.Path.exists" , new = path_exists ),
446- patch ("vec_inf.shared ._utils.get_base_url" , return_value = "Server not ready" ),
446+ patch ("vec_inf.client ._utils.get_base_url" , return_value = "Server not ready" ),
447447 ):
448448 job_id = 12345
449449 mock_run .return_value = (mock_status_output (job_id , "RUNNING" ), "" )
@@ -481,9 +481,9 @@ def test_metrics_command_server_ready(
481481 mock_response .status_code = 200
482482
483483 with (
484- patch ("vec_inf.shared ._utils.run_bash_command" ) as mock_run ,
484+ patch ("vec_inf.client ._utils.run_bash_command" ) as mock_run ,
485485 patch ("pathlib.Path.exists" , new = path_exists ),
486- patch ("vec_inf.shared ._utils.get_base_url" , return_value = "http://test:8000/v1" ),
486+ patch ("vec_inf.client ._utils.get_base_url" , return_value = "http://test:8000/v1" ),
487487 patch ("time.sleep" , side_effect = KeyboardInterrupt ), # Break the infinite loop
488488 ):
489489 job_id = 12345
@@ -507,9 +507,9 @@ def test_metrics_command_request_failed(
507507 mock_get .side_effect = requests .exceptions .RequestException ("Connection refused" )
508508
509509 with (
510- patch ("vec_inf.shared ._utils.run_bash_command" ) as mock_run ,
510+ patch ("vec_inf.client ._utils.run_bash_command" ) as mock_run ,
511511 patch ("pathlib.Path.exists" , new = path_exists ),
512- patch ("vec_inf.shared ._utils.get_base_url" , return_value = "http://test:8000/v1" ),
512+ patch ("vec_inf.client ._utils.get_base_url" , return_value = "http://test:8000/v1" ),
513513 patch ("time.sleep" , side_effect = KeyboardInterrupt ), # Break the infinite loop
514514 ):
515515 job_id = 12345
0 commit comments