Make pydntic input test stricter

- Now tests a model with inherited fields
This commit is contained in:
Nuno Campos
2025-03-05 11:15:08 -08:00
parent de85e7c246
commit 97f6f45993
+5 -6
View File
@@ -2901,7 +2901,7 @@ def test_in_one_fan_out_state_graph_waiting_edge_custom_state_class_pydantic_inp
request: pytest.FixtureRequest,
checkpointer_name: str,
) -> None:
from pydantic import BaseModel, ConfigDict
from pydantic import BaseModel
checkpointer = request.getfixturevalue(f"checkpointer_{checkpointer_name}")
@@ -2917,10 +2917,10 @@ def test_in_one_fan_out_state_graph_waiting_edge_custom_state_class_pydantic_inp
class InnerObject(BaseModel):
yo: int
class State(BaseModel):
model_config = ConfigDict(arbitrary_types_allowed=True)
class QueryModel(BaseModel):
query: str
class State(QueryModel):
inner: InnerObject
answer: Optional[str] = None
docs: Annotated[list[str], sorted_add]
@@ -2930,8 +2930,7 @@ def test_in_one_fan_out_state_graph_waiting_edge_custom_state_class_pydantic_inp
answer: Optional[str] = None
docs: Optional[list[str]] = None
class Input(BaseModel):
query: str
class Input(QueryModel):
inner: InnerObject
class Output(BaseModel):