Home / Function/ test_url_without_hostname() — langchain Function Reference

test_url_without_hostname() — langchain Function Reference

Architecture documentation for the test_url_without_hostname() function in test_ssrf_protection.py from the langchain codebase.

Entity Profile

Dependency Diagram

graph TD
  ab1ddc45_6888_edda_a49c_3c181160cc0f["test_url_without_hostname()"]
  55eb5d18_546a_f8ab_e6ce_af072e9c336d["TestValidateSafeUrl"]
  ab1ddc45_6888_edda_a49c_3c181160cc0f -->|defined in| 55eb5d18_546a_f8ab_e6ce_af072e9c336d
  style ab1ddc45_6888_edda_a49c_3c181160cc0f fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/core/tests/unit_tests/test_ssrf_protection.py lines 167–170

    def test_url_without_hostname(self) -> None:
        """Test that URLs without hostname are rejected."""
        with pytest.raises(ValueError, match="hostname"):
            validate_safe_url("http:///path")

Domain

Subdomains

Frequently Asked Questions

What does test_url_without_hostname() do?
test_url_without_hostname() is a function in the langchain codebase, defined in libs/core/tests/unit_tests/test_ssrf_protection.py.
Where is test_url_without_hostname() defined?
test_url_without_hostname() is defined in libs/core/tests/unit_tests/test_ssrf_protection.py at line 167.

Analyze Your Own Codebase

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

Try Supermodel Free