Skip to content

Commit 1a17a6d

Browse files
committed
1 parent 64d3718 commit 1a17a6d

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
@@ -72,6 +72,12 @@ def test_field2property_formats(FieldClass, expected_format, spec_fixture):
7272
res = spec_fixture.openapi.field2property(field)
7373
assert res["format"] == expected_format
7474

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

7682
def test_field_with_description(spec_fixture):
7783
field = fields.Str(metadata={"description": "a username"})

0 commit comments

Comments
 (0)