Author: kmtracey
Date: 2010-12-18 11:37:19 -0600 (Sat, 18 Dec 2010)
New Revision: 14928

Modified:
   django/trunk/tests/regressiontests/model_forms_regress/tests.py
Log:
Fixed the ModelMultipleChoiceFieldTests to pass even on DB backends that do not 
reuse pk values after rollback.


Modified: django/trunk/tests/regressiontests/model_forms_regress/tests.py
===================================================================
--- django/trunk/tests/regressiontests/model_forms_regress/tests.py     
2010-12-18 16:51:18 UTC (rev 14927)
+++ django/trunk/tests/regressiontests/model_forms_regress/tests.py     
2010-12-18 17:37:19 UTC (rev 14928)
@@ -37,7 +37,8 @@
 
         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):

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.

Reply via email to