test_draw_mermaid_png_function_base_url() — langchain Function Reference
Architecture documentation for the test_draw_mermaid_png_function_base_url() function in test_graph.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD fcdae68e_855f_811c_3e30_ad0a577227c7["test_draw_mermaid_png_function_base_url()"] 972d89eb_abd0_b940_67b4_eff75c775ace["test_graph.py"] fcdae68e_855f_811c_3e30_ad0a577227c7 -->|defined in| 972d89eb_abd0_b940_67b4_eff75c775ace style fcdae68e_855f_811c_3e30_ad0a577227c7 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/core/tests/unit_tests/runnables/test_graph.py lines 613–632
def test_draw_mermaid_png_function_base_url() -> None:
"""Test that draw_mermaid_png function passes base_url to API renderer."""
custom_url = "https://custom.mermaid.com"
mock_response = MagicMock()
mock_response.status_code = 200
mock_response.content = b"fake image data"
with patch("requests.get", return_value=mock_response) as mock_get:
# Call draw_mermaid_png with custom base_url
draw_mermaid_png(
"graph TD;\n A --> B;",
draw_method=MermaidDrawMethod.API,
base_url=custom_url,
)
# Verify that the URL was constructed with our custom base URL
assert mock_get.called
args = mock_get.call_args[0]
url = args[0] # First argument to request.get is the URL
assert url.startswith(custom_url)
Domain
Subdomains
Source
Frequently Asked Questions
What does test_draw_mermaid_png_function_base_url() do?
test_draw_mermaid_png_function_base_url() is a function in the langchain codebase, defined in libs/core/tests/unit_tests/runnables/test_graph.py.
Where is test_draw_mermaid_png_function_base_url() defined?
test_draw_mermaid_png_function_base_url() is defined in libs/core/tests/unit_tests/runnables/test_graph.py at line 613.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free