summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorAdrian Holovaty <adrian@holovaty.com>2007-01-13 05:08:07 +0000
committerAdrian Holovaty <adrian@holovaty.com>2007-01-13 05:08:07 +0000
commit6b31f95516e3a65f93a9ab6491c6e3b2b54ae620 (patch)
tree5f61504c4947c02db5ebe033aebb5c0ae7de84c7 /tests
parenta0137c41f3b9b95d48f42ddd0fb48703a88a8c94 (diff)
Fixed #3293 -- newforms: Changed IntegerField.clean() to return None if field is not required and empty. Thanks, Honza Kral
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4312 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'tests')
-rw-r--r--tests/regressiontests/forms/tests.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/regressiontests/forms/tests.py b/tests/regressiontests/forms/tests.py
index 7ad6ffb98a..bfe36a467e 100644
--- a/tests/regressiontests/forms/tests.py
+++ b/tests/regressiontests/forms/tests.py
@@ -810,9 +810,11 @@ ValidationError: [u'Enter a whole number.']
>>> f = IntegerField(required=False)
>>> f.clean('')
-u''
+>>> repr(f.clean(''))
+'None'
>>> f.clean(None)
-u''
+>>> repr(f.clean(None))
+'None'
>>> f.clean('1')
1
>>> isinstance(f.clean('1'), int)