MCPcopy
hub / github.com/fastapi/fastapi / test_encode_model_with_config

Function test_encode_model_with_config

tests/test_jsonable_encoder.py:172–174  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

170
171
172def test_encode_model_with_config():
173 model = ModelWithConfig(role=RoleEnum.admin)
174 assert jsonable_encoder(model) == {"role": "admin"}
175
176
177def test_encode_model_with_alias_raises():

Callers

nothing calls this directly

Calls 2

jsonable_encoderFunction · 0.90
ModelWithConfigClass · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…