Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

[1.2.X] Fixed the ModelMultipleChoiceFieldTests to pass even on DB ba…

…ckends that do not reuse pk values after rollback.

r14928 from trunk.


git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.2.X@14929 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 6c357cc9bbea8ecf9e1241058d0e9da210bcfd33 1 parent 5e6c541
@kmtracey kmtracey authored
Showing with 2 additions and 1 deletion.
  1. +2 −1  tests/regressiontests/model_forms_regress/tests.py
View
3  tests/regressiontests/model_forms_regress/tests.py
@@ -44,7 +44,8 @@ def my_validator(value):
f = forms.ModelMultipleChoiceField(queryset=Person.objects.all(),
validators=[my_validator])
- f.clean([1,2])
+
+ f.clean([p.pk for p in Person.objects.all()[8:9]])
self.assertTrue(self._validator_run)
class TripleForm(forms.ModelForm):
Please sign in to comment.
Something went wrong with that request. Please try again.