fix(tests): add cost_cb parameter to fake_print_agent_output function to enhance flexibility in testing
style(tests): add newline at the end of test_handle_api_error_resource_exhausted function for consistency with PEP 8 guidelines
This commit is contained in:
parent
8f2adc7f61
commit
4d4eb6cadb
|
|
@ -397,7 +397,7 @@ def test_run_agent_stream(monkeypatch, mock_config_repository):
|
||||||
call_flag = {"called": False}
|
call_flag = {"called": False}
|
||||||
|
|
||||||
def fake_print_agent_output(
|
def fake_print_agent_output(
|
||||||
chunk: Dict[str, Any], agent_type: Literal["CiaynAgent", "React"]
|
chunk: Dict[str, Any], agent_type: Literal["CiaynAgent", "React"], cost_cb=None
|
||||||
):
|
):
|
||||||
call_flag["called"] = True
|
call_flag["called"] = True
|
||||||
|
|
||||||
|
|
@ -725,4 +725,4 @@ def test_handle_api_error_resource_exhausted():
|
||||||
|
|
||||||
# ResourceExhausted exception should be handled without raising
|
# ResourceExhausted exception should be handled without raising
|
||||||
resource_exhausted_error = ResourceExhausted("429 Resource has been exhausted (e.g. check quota).")
|
resource_exhausted_error = ResourceExhausted("429 Resource has been exhausted (e.g. check quota).")
|
||||||
_handle_api_error(resource_exhausted_error, 0, 5, 1)
|
_handle_api_error(resource_exhausted_error, 0, 5, 1)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue