Skip to content

Commit 1f895be

Browse files
committed
1 parent 30df5f2 commit 1f895be

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

tests/test_ext_marshmallow_field.py

+6
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,12 @@ def test_field2property_formats(FieldClass, expected_format, spec_fixture):
7575
res = spec_fixture.openapi.field2property(field)
7676
assert res["format"] == expected_format
7777

78+
def test_field2property_min_max_date_time(spec_fixture):
79+
field = fields.DateTime(min=dt.datetime(2021,5, 1, 1,1,0), max=dt.datetime(2021, 6,1,1,1,0))
80+
res = spec_fixture.openapi.field2property(field)
81+
assert res["min"] == '2021-05-10 01:01:00'
82+
assert res["max"] == '2021-06-10 01:01:00'
83+
7884

7985
def test_field_with_description(spec_fixture):
8086
field = fields.Str(description="a username")

0 commit comments

Comments
 (0)