diff options
| author | Joseph Kocherhans <joseph@jkocherhans.com> | 2010-01-05 03:56:19 +0000 |
|---|---|---|
| committer | Joseph Kocherhans <joseph@jkocherhans.com> | 2010-01-05 03:56:19 +0000 |
| commit | 471596fc1afcb9c6258d317c619eaf5fd394e797 (patch) | |
| tree | 193767161be3cc23dc2e6be5e4f16d8fd21a2925 /tests/regressiontests/forms/error_messages.py | |
| parent | 4e89105d64bb9e04c409139a41e9c7aac263df4c (diff) | |
Merged soc2009/model-validation to trunk. Thanks, Honza!
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12098 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'tests/regressiontests/forms/error_messages.py')
| -rw-r--r-- | tests/regressiontests/forms/error_messages.py | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/tests/regressiontests/forms/error_messages.py b/tests/regressiontests/forms/error_messages.py index b7224dbde0..038fa39f6b 100644 --- a/tests/regressiontests/forms/error_messages.py +++ b/tests/regressiontests/forms/error_messages.py @@ -6,8 +6,8 @@ tests = r""" # CharField ################################################################### >>> e = {'required': 'REQUIRED'} ->>> e['min_length'] = 'LENGTH %(length)s, MIN LENGTH %(min)s' ->>> e['max_length'] = 'LENGTH %(length)s, MAX LENGTH %(max)s' +>>> e['min_length'] = 'LENGTH %(show_value)s, MIN LENGTH %(limit_value)s' +>>> e['max_length'] = 'LENGTH %(show_value)s, MAX LENGTH %(limit_value)s' >>> f = CharField(min_length=5, max_length=10, error_messages=e) >>> f.clean('') Traceback (most recent call last): @@ -26,8 +26,8 @@ ValidationError: [u'LENGTH 11, MAX LENGTH 10'] >>> e = {'required': 'REQUIRED'} >>> e['invalid'] = 'INVALID' ->>> e['min_value'] = 'MIN VALUE IS %s' ->>> e['max_value'] = 'MAX VALUE IS %s' +>>> e['min_value'] = 'MIN VALUE IS %(limit_value)s' +>>> e['max_value'] = 'MAX VALUE IS %(limit_value)s' >>> f = IntegerField(min_value=5, max_value=10, error_messages=e) >>> f.clean('') Traceback (most recent call last): @@ -50,8 +50,8 @@ ValidationError: [u'MAX VALUE IS 10'] >>> e = {'required': 'REQUIRED'} >>> e['invalid'] = 'INVALID' ->>> e['min_value'] = 'MIN VALUE IS %s' ->>> e['max_value'] = 'MAX VALUE IS %s' +>>> e['min_value'] = 'MIN VALUE IS %(limit_value)s' +>>> e['max_value'] = 'MAX VALUE IS %(limit_value)s' >>> f = FloatField(min_value=5, max_value=10, error_messages=e) >>> f.clean('') Traceback (most recent call last): @@ -74,8 +74,8 @@ ValidationError: [u'MAX VALUE IS 10'] >>> e = {'required': 'REQUIRED'} >>> e['invalid'] = 'INVALID' ->>> e['min_value'] = 'MIN VALUE IS %s' ->>> e['max_value'] = 'MAX VALUE IS %s' +>>> e['min_value'] = 'MIN VALUE IS %(limit_value)s' +>>> e['max_value'] = 'MAX VALUE IS %(limit_value)s' >>> e['max_digits'] = 'MAX DIGITS IS %s' >>> e['max_decimal_places'] = 'MAX DP IS %s' >>> e['max_whole_digits'] = 'MAX DIGITS BEFORE DP IS %s' @@ -156,8 +156,8 @@ ValidationError: [u'INVALID'] >>> e = {'required': 'REQUIRED'} >>> e['invalid'] = 'INVALID' ->>> e['min_length'] = 'LENGTH %(length)s, MIN LENGTH %(min)s' ->>> e['max_length'] = 'LENGTH %(length)s, MAX LENGTH %(max)s' +>>> e['min_length'] = 'LENGTH %(show_value)s, MIN LENGTH %(limit_value)s' +>>> e['max_length'] = 'LENGTH %(show_value)s, MAX LENGTH %(limit_value)s' >>> f = RegexField(r'^\d+$', min_length=5, max_length=10, error_messages=e) >>> f.clean('') Traceback (most recent call last): @@ -180,8 +180,8 @@ ValidationError: [u'LENGTH 11, MAX LENGTH 10'] >>> e = {'required': 'REQUIRED'} >>> e['invalid'] = 'INVALID' ->>> e['min_length'] = 'LENGTH %(length)s, MIN LENGTH %(min)s' ->>> e['max_length'] = 'LENGTH %(length)s, MAX LENGTH %(max)s' +>>> e['min_length'] = 'LENGTH %(show_value)s, MIN LENGTH %(limit_value)s' +>>> e['max_length'] = 'LENGTH %(show_value)s, MAX LENGTH %(limit_value)s' >>> f = EmailField(min_length=8, max_length=10, error_messages=e) >>> f.clean('') Traceback (most recent call last): |
