Skip to content

Commit

Permalink
test: update test with data_key
Browse files Browse the repository at this point in the history
  • Loading branch information
jgroth committed Feb 22, 2021
1 parent 0a0856b commit 160c85a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion tests/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class UserSchema(Schema):
email = fields.Email()
balance = fields.Decimal()
registered = fields.Boolean()
hair_colors = fields.List(fields.Raw)
hair_colors = fields.List(fields.Raw, data_key="hairColors", required=True)
sex_choices = fields.List(fields.Raw)
finger_count = fields.Integer()
uid = fields.UUID()
Expand Down
2 changes: 1 addition & 1 deletion tests/test_dump.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def test_dump_schema():

props = dumped["definitions"]["UserSchema"]["properties"]
for field_name, field in schema.fields.items():
assert field_name in props
assert field.data_key or field_name in props


def test_default():
Expand Down

0 comments on commit 160c85a

Please sign in to comment.