mirror of
https://github.com/BerriAI/litellm.git
synced 2026-08-28 05:25:59 +00:00
test: fix a2a guardrail stub arity and an unescaped raises match
merge_a2a_agent_guardrails_before_hooks takes only data, so the shared passthrough stub failed the reroute test; the timeout assertion needed a raw pattern for RUF043.
This commit is contained in:
parent
711d74af3b
commit
0cbf8802c1
2 changed files with 5 additions and 2 deletions
|
|
@ -110,7 +110,7 @@ async def test_poll_for_completion_honors_request_timeout():
|
|||
"litellm.a2a_protocol.providers.pydantic_ai_agents.transformation.time.monotonic",
|
||||
side_effect=[100.0, 100.0, 100.02],
|
||||
):
|
||||
with pytest.raises(TimeoutError, match="0.01 seconds"):
|
||||
with pytest.raises(TimeoutError, match=r"0\.01 seconds"):
|
||||
await PydanticAITransformation._poll_for_completion(
|
||||
client=client,
|
||||
endpoint="http://example.test",
|
||||
|
|
|
|||
|
|
@ -6273,6 +6273,9 @@ class TestPerRequestModelGroupAlias:
|
|||
async def passthrough(data, user_api_key_dict):
|
||||
return data
|
||||
|
||||
async def passthrough_data_only(data):
|
||||
return data
|
||||
|
||||
mock_proxy_logging_obj = MagicMock(spec=ProxyLogging)
|
||||
mock_proxy_logging_obj.pre_call_hook = AsyncMock(side_effect=reroute_once)
|
||||
monkeypatch.setattr(
|
||||
|
|
@ -6296,7 +6299,7 @@ class TestPerRequestModelGroupAlias:
|
|||
)
|
||||
monkeypatch.setattr(
|
||||
"litellm.proxy.agent_endpoints.a2a_routing.merge_a2a_agent_guardrails_before_hooks",
|
||||
passthrough,
|
||||
passthrough_data_only,
|
||||
)
|
||||
|
||||
returned_data, _ = await processing_obj.common_processing_pre_call_logic(
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue