assertFieldOutput should not use assertRaisesRegexp
|Reported by:||Julien Phalip||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
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
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.