Kaydet (Commit) 152ae52a authored tarafından Karen Tracey's avatar Karen Tracey

Fixed the ModelMultipleChoiceFieldTests to pass even on DB backends that do not…

Fixed the ModelMultipleChoiceFieldTests to pass even on DB backends that do not reuse pk values after rollback.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@14928 bcc190cf-cafb-0310-a4f2-bffc1f526a37
üst 78f0ab7e
......@@ -37,7 +37,8 @@ class ModelMultipleChoiceFieldTests(TestCase):
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):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment