test_mermaid_bgcolor_hex_not_encoded() — langchain Function Reference
Architecture documentation for the test_mermaid_bgcolor_hex_not_encoded() function in test_graph.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD 6f262739_170b_ab97_3a28_0cdc0ead71e1["test_mermaid_bgcolor_hex_not_encoded()"] 972d89eb_abd0_b940_67b4_eff75c775ace["test_graph.py"] 6f262739_170b_ab97_3a28_0cdc0ead71e1 -->|defined in| 972d89eb_abd0_b940_67b4_eff75c775ace style 6f262739_170b_ab97_3a28_0cdc0ead71e1 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/core/tests/unit_tests/runnables/test_graph.py lines 683–698
def test_mermaid_bgcolor_hex_not_encoded() -> None:
"""Test that hex color codes are not prefixed with '!' and work correctly."""
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:
_render_mermaid_using_api(
"graph TD;\n A --> B;",
background_color="#ffffff",
)
assert mock_get.called
url = mock_get.call_args[0][0]
# Hex colors should be URL-encoded but not prefixed with '!'
assert "%23ffffff" in url # '#' encoded as '%23'
Domain
Subdomains
Source
Frequently Asked Questions
What does test_mermaid_bgcolor_hex_not_encoded() do?
test_mermaid_bgcolor_hex_not_encoded() is a function in the langchain codebase, defined in libs/core/tests/unit_tests/runnables/test_graph.py.
Where is test_mermaid_bgcolor_hex_not_encoded() defined?
test_mermaid_bgcolor_hex_not_encoded() is defined in libs/core/tests/unit_tests/runnables/test_graph.py at line 683.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free