MCPcopy
hub / github.com/pydantic/pydantic / test_parse_obj

Function test_parse_obj

tests/test_deprecated.py:690–696  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

688
689
690def test_parse_obj():
691 with pytest.warns(
692 PydanticDeprecatedSince20, match='^The `parse_obj` method is deprecated; use `model_validate` instead.'
693 ):
694 m = SimpleModel.parse_obj({'x': 1})
695
696 assert m.model_dump() == {'x': 1}
697
698
699def test_parse_file(tmp_path):

Callers

nothing calls this directly

Calls 2

parse_objMethod · 0.45
model_dumpMethod · 0.45

Tested by

no test coverage detected