Home / Function/ test_localhost_rejected() — langchain Function Reference

test_localhost_rejected() — langchain Function Reference

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

Entity Profile

Dependency Diagram

graph TD
  feca32d4_1ed5_1ae9_c34f_799e73ad92b4["test_localhost_rejected()"]
  18fc85bc_da26_74db_45fa_4abec36050de["TestSSRFProtectedUrlType"]
  feca32d4_1ed5_1ae9_c34f_799e73ad92b4 -->|defined in| 18fc85bc_da26_74db_45fa_4abec36050de
  style feca32d4_1ed5_1ae9_c34f_799e73ad92b4 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/core/tests/unit_tests/test_ssrf_protection.py lines 224–231

    def test_localhost_rejected(self) -> None:
        """Test that localhost URLs are rejected by Pydantic schema."""

        class WebhookSchema(BaseModel):
            url: SSRFProtectedUrl

        with pytest.raises(ValidationError):
            WebhookSchema(url="http://localhost:8080")

Domain

Subdomains

Frequently Asked Questions

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

Analyze Your Own Codebase

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

Try Supermodel Free