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
Fixed #33301 -- Clarified the type of arguments required by custom assertions. #15106
Fixed #33301 -- Clarified the type of arguments required by custom assertions. #15106
Conversation
07140c7
to
c271a67
Compare
…ors() raise ValueError for non test client responses.
cdc5a21
to
9ac92b1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bmispelon Thanks 👍 I pushed small edits.
tests/test_utils/tests.py
Outdated
response = HttpResponse() | ||
|
||
with self.assertRaisesMessage(ValueError, msg): | ||
self.assertFormsetError(response, 'formset', 0, 'field', "invalid value") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
self.assertFormsetError(response, 'formset', 0, 'field', "invalid value") | |
self.assertFormError(response, 'form', 'field', 'invalid value') |
tests/test_utils/tests.py
Outdated
response = HttpResponse() | ||
|
||
with self.assertRaisesMessage(ValueError, msg): | ||
self.assertFormError(response, 'form', 'field', "invalid value") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
self.assertFormError(response, 'form', 'field', "invalid value") | |
self.assertFormsetError(response, 'formset', 0, 'field', 'invalid value') |
No description provided.