- Sort Score
- Result 10 results
- Languages All
Results 1 - 1 of 1 for ModelWithCustomEncoderSubclass (0.29 sec)
-
tests/test_jsonable_encoder.py
return dt.replace(microsecond=0, tzinfo=timezone.utc).isoformat() class ModelWithCustomEncoderSubclass(ModelWithCustomEncoder): pass model = ModelWithCustomEncoder(dt_field=datetime(2019, 1, 1, 8)) assert jsonable_encoder(model) == {"dt_field": "2019-01-01T08:00:00+00:00"} subclass_model = ModelWithCustomEncoderSubclass(dt_field=datetime(2019, 1, 1, 8))
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Apr 18 21:56:59 GMT 2024 - 9K bytes - Viewed (0)