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
  de966991_32a7_ba85_2752_3cce0387be7b["test_parse_payload_pydantic_validation_error()"]
  eae7aba5_c5d1_1ce4_8c4e_fff8ccef9488["TestOutputToolBinding"]
  de966991_32a7_ba85_2752_3cce0387be7b -->|defined in| eae7aba5_c5d1_1ce4_8c4e_fff8ccef9488
  faec538b_81a9_7663_a4dd_24a2d311fcfb["test_parse_payload_pydantic_validation_error()"]
  faec538b_81a9_7663_a4dd_24a2d311fcfb -->|calls| de966991_32a7_ba85_2752_3cce0387be7b
  faec538b_81a9_7663_a4dd_24a2d311fcfb["test_parse_payload_pydantic_validation_error()"]
  de966991_32a7_ba85_2752_3cce0387be7b -->|calls| faec538b_81a9_7663_a4dd_24a2d311fcfb
  style de966991_32a7_ba85_2752_3cce0387be7b fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/langchain_v1/tests/unit_tests/agents/test_responses.py lines 194–203

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

        # Missing required field 'name'
        tool_args = {"age": 30}

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

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 194.
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