summaryrefslogtreecommitdiff
path: root/tests/regressiontests/forms/error_messages.py
diff options
context:
space:
mode:
authorJacob Kaplan-Moss <jacob@jacobian.org>2008-07-01 15:10:51 +0000
committerJacob Kaplan-Moss <jacob@jacobian.org>2008-07-01 15:10:51 +0000
commitd725cc9734272f867d41f7236235c28b3931a1b2 (patch)
treeccb7a786eaf4f39040990aadb520863b9a4dda99 /tests/regressiontests/forms/error_messages.py
parentef76102e899b5dcfbfb2db97ce066f1dee6c0032 (diff)
Fixed #2070: refactored Django's file upload capabilities.
A description of the new features can be found in the new [http://www.djangoproject.com/documentation/upload_handing/ upload handling documentation]; the executive summary is that Django will now happily handle uploads of large files without issues. This changes the representation of uploaded files from dictionaries to bona fide objects; see BackwardsIncompatibleChanges for details. git-svn-id: http://code.djangoproject.com/svn/django/trunk@7814 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'tests/regressiontests/forms/error_messages.py')
-rw-r--r--tests/regressiontests/forms/error_messages.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/regressiontests/forms/error_messages.py b/tests/regressiontests/forms/error_messages.py
index 381282f121..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']