Skip to content
New issue

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

Fix ListField as marshmallow field params #102

Closed
wants to merge 5 commits into from
Closed

Fix ListField as marshmallow field params #102

wants to merge 5 commits into from

Conversation

lafrech
Copy link
Collaborator

@lafrech lafrech commented Mar 22, 2017

Fixes #64.

This PR is based on #101.

@coveralls
Copy link

coveralls commented Mar 22, 2017

Coverage Status

Coverage increased (+10.08%) to 95.855% when pulling 54a658d on Nobatek:fix_listfield_as_marshmallow_field into 4dde772 on Scille:master.

{'brief': 'lighter', 'value': 2, 'name': 'Unknown'}]
}
ret = ma_schema.load(data)
assert ret.errors
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

assert ret.errors seems too vague, could it be possible to test the error dict itself ?

assert ret.errors = {'_schema': ['tough shit...']}
# Or at least test the field causing the error
assert '_schema' in ret.errors

@touilleMan
Copy link
Member

So basically #101 saved the day and this PR just add unittest ? 😄

@lafrech
Copy link
Collaborator Author

lafrech commented Mar 28, 2017

Not exactly. Look at the last commit.

I also modified ListField.as_marshmallow_field to pass container params.

(And I also fixed a potential issue in EmbeddedField.as_marshmallow_field in a pop missing a default value.)

I'll rework the test as suggested in your review once we're done with #101.

@lafrech
Copy link
Collaborator Author

lafrech commented Nov 28, 2018

Rebased and pushed into another PR: #150.

@lafrech lafrech deleted the fix_listfield_as_marshmallow_field branch November 28, 2018 15:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants