test: fix Bedrock PDF tool-result bytes assertion in factory test

The test supplies a minimal PDF base64 payload but expected the wrong
constant (base64 for "test"). Assert against the same pdf_b64 value
and drop the unused import.

Made-with: Cursor
This commit is contained in:
Sameer Kankute 2026-05-01 15:35:30 +05:30
parent 94162916a8
commit 900ef454c8
No known key found for this signature in database

View file

@ -2487,10 +2487,6 @@ def test_convert_to_anthropic_tool_result_openai_file_pdf_becomes_document():
inside the tool_result content. Reuses anthropic_process_openai_file_message,
which already handles this for user messages.
"""
from litellm.litellm_core_utils.prompt_templates.factory import (
convert_to_anthropic_tool_result,
)
pdf_b64 = "JVBERi0xLjQKJeLjz9MK"
message = {
"tool_call_id": "toolu_pdf_1",
@ -2513,7 +2509,7 @@ def test_convert_to_anthropic_tool_result_openai_file_pdf_becomes_document():
assert len(tool_result["content"]) == 1
assert "document" in tool_result["content"][0]
assert tool_result["content"][0]["document"]["format"] == "pdf"
assert tool_result["content"][0]["document"]["source"]["bytes"] == "dGVzdA=="
assert tool_result["content"][0]["document"]["source"]["bytes"] == pdf_b64
def test_bedrock_converse_messages_pt_document_various_formats():