MCPcopy Index your code
hub / github.com/fastapi/sqlmodel / test_dict_default_uses_field_names

Function test_dict_default_uses_field_names

tests/test_aliases.py:65–72  ·  view source on GitHub ↗
(
    model: type[PydanticUser] | type[SQLModelUser],
)

Source from the content-addressed store, hash-verified

63
64@pytest.mark.parametrize("model", [PydanticUser, SQLModelUser])
65def test_dict_default_uses_field_names(
66 model: type[PydanticUser] | type[SQLModelUser],
67):
68 user = model(fullName="Dana")
69 data = user.model_dump()
70 assert "full_name" in data
71 assert "fullName" not in data
72 assert data["full_name"] == "Dana"
73
74
75@pytest.mark.parametrize("model", [PydanticUser, SQLModelUser])

Callers

nothing calls this directly

Calls 1

model_dumpMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…