Home / Function/ test_get_buffer_string_xml_url_with_special_chars() — langchain Function Reference

test_get_buffer_string_xml_url_with_special_chars() — langchain Function Reference

Architecture documentation for the test_get_buffer_string_xml_url_with_special_chars() function in test_utils.py from the langchain codebase.

Entity Profile

Dependency Diagram

graph TD
  648cb382_b427_51af_2467_aa1cec7d1d19["test_get_buffer_string_xml_url_with_special_chars()"]
  ea3f8d89_f44b_6738_3cb9_a740a73cfca4["test_utils.py"]
  648cb382_b427_51af_2467_aa1cec7d1d19 -->|defined in| ea3f8d89_f44b_6738_3cb9_a740a73cfca4
  style 648cb382_b427_51af_2467_aa1cec7d1d19 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/core/tests/unit_tests/messages/test_utils.py lines 2565–2576

def test_get_buffer_string_xml_url_with_special_chars() -> None:
    """Test that URLs with special characters are properly quoted."""
    messages: list[BaseMessage] = [
        HumanMessage(
            content=[
                {"type": "image", "url": "https://example.com/img?a=1&b=2"},
            ]
        ),
    ]
    result = get_buffer_string(messages, format="xml")
    # quoteattr should handle the & in the URL
    assert "https://example.com/img?a=1&b=2" in result

Subdomains

Frequently Asked Questions

What does test_get_buffer_string_xml_url_with_special_chars() do?
test_get_buffer_string_xml_url_with_special_chars() is a function in the langchain codebase, defined in libs/core/tests/unit_tests/messages/test_utils.py.
Where is test_get_buffer_string_xml_url_with_special_chars() defined?
test_get_buffer_string_xml_url_with_special_chars() is defined in libs/core/tests/unit_tests/messages/test_utils.py at line 2565.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free