Permalink
Browse files

Fixed the ModelMultipleChoiceFieldTests to pass even on DB backends t…

…hat do not reuse pk values after rollback.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@14928 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
1 parent 78f0ab7 commit 152ae52a6dd89fd7ff19ec8d6ea0c78c5ecc67a8 @kmtracey kmtracey committed Dec 18, 2010
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
@@ -37,7 +37,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):

0 comments on commit 152ae52

Please sign in to comment.