mirror of
https://github.com/BerriAI/litellm.git
synced 2026-11-18 09:45:23 +00:00
test(guardrails): assert on the observed payload, not only the mock
Co-authored-by: feng.tsai <fengtsai@berri.ai> Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
parent
839ab1cd5e
commit
6d3a12537a
1 changed files with 3 additions and 0 deletions
|
|
@ -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"]
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue