- Sort Score
- Num 10 results
- Language All
Results 1 - 1 of 1 for test_encode_model_with_config (0.21 seconds)
-
tests/test_jsonable_encoder.py
class ModelV1(v1.BaseModel): name: str data = ModelV1(name="test") with pytest.raises(PydanticV1NotSupportedError): jsonable_encoder(data) def test_encode_model_with_config(): model = ModelWithConfig(role=RoleEnum.admin) assert jsonable_encoder(model) == {"role": "admin"} def test_encode_model_with_alias_raises(): with pytest.raises(ValidationError):Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Tue Feb 17 09:59:14 GMT 2026 - 9.2K bytes - Click Count (0)