Home / Function/ test_localhost_accepted() — langchain Function Reference

test_localhost_accepted() — langchain Function Reference

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

Entity Profile

Dependency Diagram

graph TD
  f494b4c1_1205_bd59_8111_c7d6e46213a2["test_localhost_accepted()"]
  3fe76024_67bd_4f46_17e1_d93680b2fc5e["TestSSRFProtectedUrlRelaxedType"]
  f494b4c1_1205_bd59_8111_c7d6e46213a2 -->|defined in| 3fe76024_67bd_4f46_17e1_d93680b2fc5e
  style f494b4c1_1205_bd59_8111_c7d6e46213a2 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/core/tests/unit_tests/test_ssrf_protection.py lines 255–262

    def test_localhost_accepted(self) -> None:
        """Test that localhost URLs are accepted by relaxed schema."""

        class WebhookSchema(BaseModel):
            url: SSRFProtectedUrlRelaxed

        schema = WebhookSchema(url="http://localhost:8080")
        assert str(schema.url).startswith("http://localhost")

Domain

Subdomains

Frequently Asked Questions

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

Analyze Your Own Codebase

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

Try Supermodel Free