@@ -19,10 +19,10 @@ def test_benchmark_run_with_backend_args():
19
19
"--backend-args" ,
20
20
'{"headers": {"Authorization": "Bearer my-token"}, "verify": false}' ,
21
21
"--target" ,
22
- "http://localhost:8000 " ,
22
+ "http://localhost:9 " ,
23
23
"--data" ,
24
24
"prompt_tokens=1,output_tokens=1" ,
25
- "--rate-type " ,
25
+ "--profile " ,
26
26
"constant" ,
27
27
"--rate" ,
28
28
"1" ,
@@ -36,7 +36,7 @@ def test_benchmark_run_with_backend_args():
36
36
assert "Invalid header format" not in result .output
37
37
38
38
39
- @patch ("guidellm.__main__.benchmark_with_scenario " )
39
+ @patch ("guidellm.__main__.benchmark_generative_text " )
40
40
def test_cli_backend_args_header_removal (mock_benchmark_func , tmp_path : Path ):
41
41
"""
42
42
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):
47
47
# Create a scenario file with a header that should be overridden and removed
48
48
scenario_content = {
49
49
"backend_type" : "openai_http" ,
50
- "backend_args " : {"headers" : {"Authorization" : "should-be-removed" }},
50
+ "backend_kwargs " : {"headers" : {"Authorization" : "should-be-removed" }},
51
51
"data" : "prompt_tokens=10,output_tokens=10" ,
52
52
"max_requests" : 1 ,
53
53
"target" : "http://dummy-target" ,
54
- "rate_type " : "synchronous" ,
54
+ "profile " : "synchronous" ,
55
55
"processor" : "gpt2" ,
56
56
}
57
57
with scenario_path .open ("w" ) as f :
@@ -65,7 +65,7 @@ def test_cli_backend_args_header_removal(mock_benchmark_func, tmp_path: Path):
65
65
"run" ,
66
66
"--scenario" ,
67
67
str (scenario_path ),
68
- "--backend-args " ,
68
+ "--backend-kwargs " ,
69
69
'{"headers": {"Authorization": null, "Custom-Header": "Custom-Value"}}' ,
70
70
],
71
71
catch_exceptions = False ,
@@ -79,6 +79,6 @@ def test_cli_backend_args_header_removal(mock_benchmark_func, tmp_path: Path):
79
79
scenario = call_args ["scenario" ]
80
80
81
81
# Verify the backend_args were merged correctly
82
- backend_args = scenario .backend_args
82
+ backend_args = scenario .backend_kwargs
83
83
expected_headers = {"Authorization" : None , "Custom-Header" : "Custom-Value" }
84
84
assert backend_args ["headers" ] == expected_headers
0 commit comments