test_get_buffer_string_xml_function_call_special_chars_in_name() — langchain Function Reference
Architecture documentation for the test_get_buffer_string_xml_function_call_special_chars_in_name() function in test_utils.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD 44a297ff_0423_5069_ba6b_c62b7d1cd58b["test_get_buffer_string_xml_function_call_special_chars_in_name()"] 03f6a5ae_d57a_eb66_626a_b9e082b763ea["test_utils.py"] 44a297ff_0423_5069_ba6b_c62b7d1cd58b -->|defined in| 03f6a5ae_d57a_eb66_626a_b9e082b763ea style 44a297ff_0423_5069_ba6b_c62b7d1cd58b fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/core/tests/unit_tests/messages/test_utils.py lines 2247–2262
def test_get_buffer_string_xml_function_call_special_chars_in_name() -> None:
"""Test that `function_call` name with quotes is properly escaped."""
messages: list[BaseMessage] = [
AIMessage(
content="",
additional_kwargs={
"function_call": {
"name": 'func"name',
"arguments": "{}",
}
},
),
]
result = get_buffer_string(messages, format="xml")
# quoteattr uses single quotes when value contains double quotes
assert "name='func\"name'" in result
Domain
Subdomains
Source
Frequently Asked Questions
What does test_get_buffer_string_xml_function_call_special_chars_in_name() do?
test_get_buffer_string_xml_function_call_special_chars_in_name() 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_function_call_special_chars_in_name() defined?
test_get_buffer_string_xml_function_call_special_chars_in_name() is defined in libs/core/tests/unit_tests/messages/test_utils.py at line 2247.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free