Home / Function/ test_parse_payload_pydantic_validation_error() — langchain Function Reference

test_parse_payload_pydantic_validation_error() — langchain Function Reference

Architecture documentation for the test_parse_payload_pydantic_validation_error() function in test_responses.py from the langchain codebase.

Entity Profile

Dependency Diagram

graph TD
  faec538b_81a9_7663_a4dd_24a2d311fcfb["test_parse_payload_pydantic_validation_error()"]
  df2c2abc_4904_553b_6a07_5ca642deeb63["TestProviderStrategyBinding"]
  faec538b_81a9_7663_a4dd_24a2d311fcfb -->|defined in| df2c2abc_4904_553b_6a07_5ca642deeb63
  de966991_32a7_ba85_2752_3cce0387be7b["test_parse_payload_pydantic_validation_error()"]
  de966991_32a7_ba85_2752_3cce0387be7b -->|calls| faec538b_81a9_7663_a4dd_24a2d311fcfb
  de966991_32a7_ba85_2752_3cce0387be7b["test_parse_payload_pydantic_validation_error()"]
  faec538b_81a9_7663_a4dd_24a2d311fcfb -->|calls| de966991_32a7_ba85_2752_3cce0387be7b
  style faec538b_81a9_7663_a4dd_24a2d311fcfb fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/langchain_v1/tests/unit_tests/agents/test_responses.py lines 230–239

    def test_parse_payload_pydantic_validation_error(self) -> None:
        """Test parsing failure for invalid Pydantic data."""
        schema_spec = _SchemaSpec(schema=_TestModel)
        tool_binding = ProviderStrategyBinding.from_schema_spec(schema_spec)

        # Missing required field 'name'
        message = AIMessage(content='{"age": 30}')

        with pytest.raises(ValueError, match="Failed to parse data to _TestModel"):
            tool_binding.parse(message)

Domain

Subdomains

Frequently Asked Questions

What does test_parse_payload_pydantic_validation_error() do?
test_parse_payload_pydantic_validation_error() is a function in the langchain codebase, defined in libs/langchain_v1/tests/unit_tests/agents/test_responses.py.
Where is test_parse_payload_pydantic_validation_error() defined?
test_parse_payload_pydantic_validation_error() is defined in libs/langchain_v1/tests/unit_tests/agents/test_responses.py at line 230.
What does test_parse_payload_pydantic_validation_error() call?
test_parse_payload_pydantic_validation_error() calls 1 function(s): test_parse_payload_pydantic_validation_error.
What calls test_parse_payload_pydantic_validation_error()?
test_parse_payload_pydantic_validation_error() is called by 1 function(s): test_parse_payload_pydantic_validation_error.

Analyze Your Own Codebase

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

Try Supermodel Free