summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorJacob Kaplan-Moss <jacob@jacobian.org>2009-03-31 21:48:29 +0000
committerJacob Kaplan-Moss <jacob@jacobian.org>2009-03-31 21:48:29 +0000
commit795697dc225af79958f16610906df3a31a4b2eaa (patch)
tree5bdf0358fa318a3c72164568145a9a49c04028f6 /tests
parent67a58801623cccd55ecdd7d21f7b2dc487175c03 (diff)
[1.0.X] Fixed #8746: Check data in raw_id_fields more closely. Thanks, dgouldin
Backport of r10233 from trunk. git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@10294 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'tests')
-rw-r--r--tests/modeltests/model_forms/models.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/modeltests/model_forms/models.py b/tests/modeltests/model_forms/models.py
index 1e72a553b1..7a42bc226c 100644
--- a/tests/modeltests/model_forms/models.py
+++ b/tests/modeltests/model_forms/models.py
@@ -813,6 +813,10 @@ ValidationError: [u'Select a valid choice. 100 is not one of the available choic
Traceback (most recent call last):
...
ValidationError: [u'Enter a list of values.']
+>>> f.clean(['fail'])
+Traceback (most recent call last):
+...
+ValidationError: [u'"fail" is not a valid value for a primary key.']
# Add a Category object *after* the ModelMultipleChoiceField has already been
# instantiated. This proves clean() checks the database during clean() rather