summaryrefslogtreecommitdiff
path: root/tests/regressiontests/forms/error_messages.py
diff options
context:
space:
mode:
authorJustin Bronn <jbronn@gmail.com>2008-07-04 20:16:22 +0000
committerJustin Bronn <jbronn@gmail.com>2008-07-04 20:16:22 +0000
commitbc3d6b49089ef0ea7d174eb383b1019b6a4a061a (patch)
treeb95728880e8a968ae6a921a21cec501f6a278d08 /tests/regressiontests/forms/error_messages.py
parentaef8a8305d2190b00386b8b1603deb03a2949f5b (diff)
gis: Merged revisions 7772-7808,7811-7814,7816-7823,7826-7829,7831-7833,7835 via svnmerge from trunk. Modified `GeoWhereNode` accordingly for changes in r7835.
git-svn-id: http://code.djangoproject.com/svn/django/branches/gis@7836 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'tests/regressiontests/forms/error_messages.py')
-rw-r--r--tests/regressiontests/forms/error_messages.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/tests/regressiontests/forms/error_messages.py b/tests/regressiontests/forms/error_messages.py
index 9f972f5b90..580326f894 100644
--- a/tests/regressiontests/forms/error_messages.py
+++ b/tests/regressiontests/forms/error_messages.py
@@ -1,6 +1,7 @@
# -*- coding: utf-8 -*-
tests = r"""
>>> from django.newforms import *
+>>> from django.core.files.uploadedfile import SimpleUploadedFile
# CharField ###################################################################
@@ -214,11 +215,11 @@ ValidationError: [u'REQUIRED']
Traceback (most recent call last):
...
ValidationError: [u'INVALID']
->>> f.clean({})
+>>> f.clean(SimpleUploadedFile('name', None))
Traceback (most recent call last):
...
-ValidationError: [u'MISSING']
->>> f.clean({'filename': 'name', 'content':''})
+ValidationError: [u'EMPTY FILE']
+>>> f.clean(SimpleUploadedFile('name', ''))
Traceback (most recent call last):
...
ValidationError: [u'EMPTY FILE']
@@ -237,7 +238,7 @@ ValidationError: [u'REQUIRED']
Traceback (most recent call last):
...
ValidationError: [u'INVALID']
->>> f.clean('http://www.jfoiwjfoi23jfoijoaijfoiwjofiwjefewl.com')
+>>> f.clean('http://www.broken.djangoproject.com')
Traceback (most recent call last):
...
ValidationError: [u'INVALID LINK']