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

Function test_dict_by_alias_uses_aliases

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

Source from the content-addressed store, hash-verified

74
75@pytest.mark.parametrize("model", [PydanticUser, SQLModelUser])
76def test_dict_by_alias_uses_aliases(
77 model: type[PydanticUser] | type[SQLModelUser],
78):
79 user = model(fullName="Dana")
80 data = user.model_dump(by_alias=True)
81 assert "fullName" in data
82 assert "full_name" not in data
83 assert data["fullName"] == "Dana"
84
85
86@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…