diff --git a/tests/__init__.py b/tests/__init__.py index 829cead..961432b 100644 --- a/tests/__init__.py +++ b/tests/__init__.py @@ -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() diff --git a/tests/test_dump.py b/tests/test_dump.py index 5a8d1d8..2a77177 100644 --- a/tests/test_dump.py +++ b/tests/test_dump.py @@ -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():