diff options
| author | Claude Paroz <claude@2xlibre.net> | 2013-03-14 16:19:59 +0100 |
|---|---|---|
| committer | Claude Paroz <claude@2xlibre.net> | 2013-03-14 17:03:43 +0100 |
| commit | 2f121dfe635b3f497fe1fe03bc8eb97cdf5083b3 (patch) | |
| tree | d858b3ac2a6ee0beb52a079e98ac065dc0253834 /django/contrib | |
| parent | 34d098665d9423c0b70add5b8c8231fff9d0f774 (diff) | |
Fixed #17051 -- Removed some 'invalid' field error messages
When the 'invalid' error message is set at field level, it masks
the error message raised by the validator, if any.
Diffstat (limited to 'django/contrib')
| -rw-r--r-- | django/contrib/auth/tests/forms.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/django/contrib/auth/tests/forms.py b/django/contrib/auth/tests/forms.py index 7b12491683..2c8f6e4faf 100644 --- a/django/contrib/auth/tests/forms.py +++ b/django/contrib/auth/tests/forms.py @@ -7,7 +7,7 @@ from django.contrib.auth.forms import (UserCreationForm, AuthenticationForm, ReadOnlyPasswordHashField, ReadOnlyPasswordHashWidget) from django.contrib.auth.tests.utils import skipIfCustomUser from django.core import mail -from django.forms.fields import Field, EmailField, CharField +from django.forms.fields import Field, CharField from django.test import TestCase from django.test.utils import override_settings from django.utils.encoding import force_text @@ -322,8 +322,7 @@ class PasswordResetFormTest(TestCase): data = {'email': 'not valid'} form = PasswordResetForm(data) self.assertFalse(form.is_valid()) - self.assertEqual(form['email'].errors, - [force_text(EmailField.default_error_messages['invalid'])]) + self.assertEqual(form['email'].errors, [_('Enter a valid email address.')]) def test_nonexistant_email(self): # Test nonexistant email address. This should not fail because it would |
