Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
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...
commit 152ae52a6dd89fd7ff19ec8d6ea0c78c5ecc67a8 1 parent 78f0ab7
@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
@@ -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):
Please sign in to comment.
Something went wrong with that request. Please try again.