@@ -18,15 +18,15 @@ def setup_and_teardown(self):
1818 def test_model_import_should_be_success (self ):
1919 body_json = {'model' : 'tinyllama:gguf' ,
2020 'modelPath' : '/path/to/local/gguf' }
21- response = requests .post ("http://localhost:3928/models/import" , json = body_json )
21+ response = requests .post ("http://localhost:3928/v1/ models/import" , json = body_json )
2222 assert response .status_code == 200
2323
2424 @pytest .mark .skipif (True , reason = "Expensive test. Only test when you have local gguf file." )
2525 def test_model_import_with_name_should_be_success (self ):
2626 body_json = {'model' : 'tinyllama:gguf' ,
2727 'modelPath' : '/path/to/local/gguf' ,
2828 'name' : 'test_model' }
29- response = requests .post ("http://localhost:3928/models/import" , json = body_json )
29+ response = requests .post ("http://localhost:3928/v1/ models/import" , json = body_json )
3030 assert response .status_code == 200
3131
3232 @pytest .mark .skipif (True , reason = "Expensive test. Only test when you have local gguf file." )
@@ -35,10 +35,10 @@ def test_model_import_with_name_should_be_success(self):
3535 'modelPath' : '/path/to/local/gguf' ,
3636 'name' : 'test_model' ,
3737 'option' : 'copy' }
38- response = requests .post ("http://localhost:3928/models/import" , json = body_json )
38+ response = requests .post ("http://localhost:3928/v1/ models/import" , json = body_json )
3939 assert response .status_code == 200
4040 # Test imported path
41- response = requests .get ("http://localhost:3928/models/testing-model" )
41+ response = requests .get ("http://localhost:3928/v1/ models/testing-model" )
4242 assert response .status_code == 200
4343 # Since this is a dynamic test - require actual file path
4444 # it's not safe to assert with the gguf file name
@@ -47,11 +47,11 @@ def test_model_import_with_name_should_be_success(self):
4747 def test_model_import_with_invalid_path_should_fail (self ):
4848 body_json = {'model' : 'tinyllama:gguf' ,
4949 'modelPath' : '/invalid/path/to/gguf' }
50- response = requests .post ("http://localhost:3928/models/import" , json = body_json )
50+ response = requests .post ("http://localhost:3928/v1/ models/import" , json = body_json )
5151 assert response .status_code == 400
5252
5353 def test_model_import_with_missing_model_should_fail (self ):
5454 body_json = {'modelPath' : '/path/to/local/gguf' }
55- response = requests .post ("http://localhost:3928/models/import" , json = body_json )
55+ response = requests .post ("http://localhost:3928/v1/ models/import" , json = body_json )
5656 print (response )
5757 assert response .status_code == 409
0 commit comments