From 6d3a12537a84f77455a55c4e05ae750a0f01be3e Mon Sep 17 00:00:00 2001 From: yucheng Date: Wed, 23 Sep 2026 20:24:45 +0000 Subject: [PATCH] test(guardrails): assert on the observed payload, not only the mock Co-authored-by: feng.tsai Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> --- .../guardrails/guardrail_hooks/test_bedrock_guardrails.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/test_litellm/proxy/guardrails/guardrail_hooks/test_bedrock_guardrails.py b/tests/test_litellm/proxy/guardrails/guardrail_hooks/test_bedrock_guardrails.py index 7efb623c776..00a4c19720a 100644 --- a/tests/test_litellm/proxy/guardrails/guardrail_hooks/test_bedrock_guardrails.py +++ b/tests/test_litellm/proxy/guardrails/guardrail_hooks/test_bedrock_guardrails.py @@ -7250,6 +7250,7 @@ async def test_during_call_hook_refuses_serialized_tool_output_attachment_unknow ) mock_post.assert_called_once() + assert "output_text" in data["messages"][0]["content"] @pytest.mark.asyncio @@ -7332,6 +7333,7 @@ async def test_during_call_hook_drops_bare_attachment_shells(): ) mock_post.assert_called_once() + assert data["messages"][0]["content"][1] == {"type": "file"} @pytest.mark.asyncio @@ -7420,3 +7422,4 @@ async def test_during_call_hook_tool_output_payloadless_shell_falls_through(): ) mock_post.assert_called_once() + assert "input_file" in data["messages"][0]["content"]