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

Minor cleanup for ModelSerializer tests #5598

Merged
merged 5 commits into from
Nov 22, 2017

Conversation

rpkilby
Copy link
Member

@rpkilby rpkilby commented Nov 15, 2017

Just some minor changes.

  • Replaced assertRaises w/ assertRaisesMessage, reducing some test verbosity.
  • test_fields_and_exclude_behavior is no longer relevant, as it tested the old behavior of Meta.fields = '__all__' being implicitly set when Meta.fields and Meta.exclude weren't present.
  • Simplified parent class in inheritance test for declared fields.

@carltongibson carltongibson added this to the v3.7.4 milestone Nov 22, 2017
Copy link
Collaborator

@carltongibson carltongibson left a comment

Choose a reason for hiding this comment

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

Yep. Great.

@carltongibson carltongibson merged commit ae88f5c into encode:master Nov 22, 2017
@rpkilby rpkilby deleted the fixup-modelserializer-tests branch November 22, 2017 09:37
pchiquet pushed a commit to pchiquet/django-rest-framework that referenced this pull request Nov 17, 2020
* Replace assertRaises with assertRaisesMessage

* Remove outdated implicit Meta.fields test

* Simplify parent declared field test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants