Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for ModelWithCustomEncoderSubclass (0.29 sec)

  1. 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)
Back to top