Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
codeasashu committed Sep 20, 2021
1 parent 30df5f2 commit 1f895be
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tests/test_ext_marshmallow_field.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,12 @@ def test_field2property_formats(FieldClass, expected_format, spec_fixture):
res = spec_fixture.openapi.field2property(field)
assert res["format"] == expected_format

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


def test_field_with_description(spec_fixture):
field = fields.Str(description="a username")
Expand Down

0 comments on commit 1f895be

Please sign in to comment.