We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Python 3.6.6 Schematics 2.1.0
ListField ignores choices parameter of underlying field when creating mock object. Here is minimal code that reproduces error:
ListField
choices
from schematics.types import StringType, ListType from schematics.models import Model class Foo(Model): bar = StringType(choices=["lol", "kek"], required=True) baz = ListType(StringType(choices=["lol", "kek"]), required=True) print(Foo.get_mock_object().to_primitive()) # >> {'bar': 'kek', 'baz': ['mwhot1h', '57kMabXP', 'koMg', 'GBtlbJQvT', '']}
It seems to work fine with params like max_length though, so i don't know what the deal is. Have i just missed something that's specified in docs?
max_length
With current behavior, objects generated by mocking fail to validate against model, which is frustrating.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Python 3.6.6
Schematics 2.1.0
ListField
ignoreschoices
parameter of underlying field when creating mock object. Here is minimal code that reproduces error:It seems to work fine with params like
max_length
though, so i don't know what the deal is. Have i just missed something that's specified in docs?With current behavior, objects generated by mocking fail to validate against model, which is frustrating.
The text was updated successfully, but these errors were encountered: