assertFieldOutput should not use assertRaisesRegexp
|Reported by:||julien||Owned by:||nobody|
|Cc:||lawgon@…||Triage Stage:||Ready for checkin|
|Has patch:||yes||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
The fact that assertFieldOutput uses assertRaisesRegexp causes some weird and inconsistent behaviours, which I describe in more detail in #14608 and in http://groups.google.com/group/django-developers/browse_thread/thread/96da81267aadade0
Not only does it make no sense to use regular expressions here, but also pretty much all the tests in regressiontests.forms.localflavor using assertFieldOutput are currently passing without being absolutely sure that the expected error messages are correct (To verify that, try modifying any error message in those tests -- the tests will still pass).
See attached patch fixing the behaviour and also straightening some tests that were incorrectly passing before.
Marking as Release Blocker since, in effect, the test suite is currently broken because of this behaviour.
Change History (12)
comment:4 Changed 5 years ago by lrekucki
- Easy pickings unset
- Triage Stage changed from Unreviewed to Accepted
comment:6 Changed 5 years ago by claudep
- Triage Stage changed from Accepted to Ready for checkin
- Version changed from 1.2 to SVN