test_parse_url_with_auth_special_characters() — langchain Function Reference
Architecture documentation for the test_parse_url_with_auth_special_characters() function in test_auth.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD baa258ae_8c67_c2dd_2bd2_ec25521b50dc["test_parse_url_with_auth_special_characters()"] 32235838_c616_6ae7_3819_7800d606b299["TestParseUrlWithAuth"] baa258ae_8c67_c2dd_2bd2_ec25521b50dc -->|defined in| 32235838_c616_6ae7_3819_7800d606b299 style baa258ae_8c67_c2dd_2bd2_ec25521b50dc fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/partners/ollama/tests/unit_tests/test_auth.py lines 52–63
def test_parse_url_with_auth_special_characters(self) -> None:
"""Test URLs with special characters in credentials."""
url = "https://user%40domain:p%40ssw0rd@ollama.example.com:11434"
cleaned_url, headers = parse_url_with_auth(url)
expected_url = "https://ollama.example.com:11434"
# Note: URL parsing handles percent-encoding automatically
expected_credentials = base64.b64encode(b"user@domain:p@ssw0rd").decode()
expected_headers = {"Authorization": f"Basic {expected_credentials}"}
assert cleaned_url == expected_url
assert headers == expected_headers
Domain
Subdomains
Source
Frequently Asked Questions
What does test_parse_url_with_auth_special_characters() do?
test_parse_url_with_auth_special_characters() is a function in the langchain codebase, defined in libs/partners/ollama/tests/unit_tests/test_auth.py.
Where is test_parse_url_with_auth_special_characters() defined?
test_parse_url_with_auth_special_characters() is defined in libs/partners/ollama/tests/unit_tests/test_auth.py at line 52.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free