@@ -19,10 +19,10 @@ def test_benchmark_run_with_backend_args():
1919 "--backend-args" ,
2020 '{"headers": {"Authorization": "Bearer my-token"}, "verify": false}' ,
2121 "--target" ,
22- "http://localhost:8000 " ,
22+ "http://localhost:9 " ,
2323 "--data" ,
2424 "prompt_tokens=1,output_tokens=1" ,
25- "--rate-type " ,
25+ "--profile " ,
2626 "constant" ,
2727 "--rate" ,
2828 "1" ,
@@ -36,7 +36,7 @@ def test_benchmark_run_with_backend_args():
3636 assert "Invalid header format" not in result .output
3737
3838
39- @patch ("guidellm.__main__.benchmark_with_scenario " )
39+ @patch ("guidellm.__main__.benchmark_generative_text " )
4040def test_cli_backend_args_header_removal (mock_benchmark_func , tmp_path : Path ):
4141 """
4242 Tests that --backend-args from the CLI correctly overrides scenario
@@ -47,11 +47,11 @@ def test_cli_backend_args_header_removal(mock_benchmark_func, tmp_path: Path):
4747 # Create a scenario file with a header that should be overridden and removed
4848 scenario_content = {
4949 "backend_type" : "openai_http" ,
50- "backend_args " : {"headers" : {"Authorization" : "should-be-removed" }},
50+ "backend_kwargs " : {"headers" : {"Authorization" : "should-be-removed" }},
5151 "data" : "prompt_tokens=10,output_tokens=10" ,
5252 "max_requests" : 1 ,
5353 "target" : "http://dummy-target" ,
54- "rate_type " : "synchronous" ,
54+ "profile " : "synchronous" ,
5555 "processor" : "gpt2" ,
5656 }
5757 with scenario_path .open ("w" ) as f :
@@ -65,7 +65,7 @@ def test_cli_backend_args_header_removal(mock_benchmark_func, tmp_path: Path):
6565 "run" ,
6666 "--scenario" ,
6767 str (scenario_path ),
68- "--backend-args " ,
68+ "--backend-kwargs " ,
6969 '{"headers": {"Authorization": null, "Custom-Header": "Custom-Value"}}' ,
7070 ],
7171 catch_exceptions = False ,
@@ -79,6 +79,6 @@ def test_cli_backend_args_header_removal(mock_benchmark_func, tmp_path: Path):
7979 scenario = call_args ["scenario" ]
8080
8181 # Verify the backend_args were merged correctly
82- backend_args = scenario .backend_args
82+ backend_args = scenario .backend_kwargs
8383 expected_headers = {"Authorization" : None , "Custom-Header" : "Custom-Value" }
8484 assert backend_args ["headers" ] == expected_headers
0 commit comments