summaryrefslogtreecommitdiff
path: root/django/test
diff options
context:
space:
mode:
authorClaude Paroz <claude@2xlibre.net>2013-03-07 09:21:59 +0100
committerClaude Paroz <claude@2xlibre.net>2013-03-07 15:22:03 +0100
commit4cccb85e292fea01b3459cd97d751ed35179a7b7 (patch)
tree3132e647c343b8e3b900438d7b1080ddc3cb20fd /django/test
parent25ce177e66fb0e88a39806f5a493e03f1801775a (diff)
Fixed #19997 -- Added custom EMPTY_VALUES to form fields
Thanks Loic Bistuer for the report and the patch.
Diffstat (limited to 'django/test')
-rw-r--r--django/test/testcases.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/django/test/testcases.py b/django/test/testcases.py
index 345e4b191b..44ddb624d6 100644
--- a/django/test/testcases.py
+++ b/django/test/testcases.py
@@ -27,7 +27,6 @@ from django.core.management.color import no_style
from django.core.servers.basehttp import (WSGIRequestHandler, WSGIServer,
WSGIServerException)
from django.core.urlresolvers import clear_url_caches
-from django.core.validators import EMPTY_VALUES
from django.db import connection, connections, DEFAULT_DB_ALIAS, transaction
from django.forms.fields import CharField
from django.http import QueryDict
@@ -322,7 +321,7 @@ class SimpleTestCase(ut2.TestCase):
raised error messages.
field_args: the args passed to instantiate the field
field_kwargs: the kwargs passed to instantiate the field
- empty_value: the expected clean output for inputs in EMPTY_VALUES
+ empty_value: the expected clean output for inputs in empty_values
"""
if field_args is None:
@@ -347,7 +346,7 @@ class SimpleTestCase(ut2.TestCase):
self.assertEqual(context_manager.exception.messages, errors)
# test required inputs
error_required = [force_text(required.error_messages['required'])]
- for e in EMPTY_VALUES:
+ for e in required.empty_values:
with self.assertRaises(ValidationError) as context_manager:
required.clean(e)
self.assertEqual(context_manager.exception.messages,