MCPcopy
hub / github.com/pydantic/pydantic / test_validate

Function test_validate

tests/test_deprecated.py:736–742  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

734
735
736def test_validate():
737 with pytest.warns(
738 PydanticDeprecatedSince20, match='^The `validate` method is deprecated; use `model_validate` instead.'
739 ):
740 m = SimpleModel.validate({'x': 1})
741
742 assert m.model_dump() == {'x': 1}
743
744
745def test_update_forward_refs():

Callers

nothing calls this directly

Calls 2

validateMethod · 0.45
model_dumpMethod · 0.45

Tested by

no test coverage detected