Home / Function/ test_valid_url_accepted() — langchain Function Reference

test_valid_url_accepted() — langchain Function Reference

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

Entity Profile

Dependency Diagram

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

Relationship Graph

Source Code

libs/core/tests/unit_tests/test_ssrf_protection.py lines 215–222

    def test_valid_url_accepted(self) -> None:
        """Test that valid URLs are accepted by Pydantic schema."""

        class WebhookSchema(BaseModel):
            url: SSRFProtectedUrl

        schema = WebhookSchema(url="https://hooks.slack.com/services/xxx")
        assert str(schema.url).startswith("https://hooks.slack.com/")

Domain

Subdomains

Frequently Asked Questions

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

Analyze Your Own Codebase

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

Try Supermodel Free