Fixed test_clean_does_deduplicate_values on Oracle after
@@ -1863,11 +1863,11 @@ class ModelMultipleChoiceFieldTests(TestCase):
self.assertTrue(form.has_changed())
def test_clean_does_deduplicate_values(self):
- class WriterForm(forms.Form):
- persons = forms.ModelMultipleChoiceField(queryset=Writer.objects.all())
+ class PersonForm(forms.Form):
+ persons = forms.ModelMultipleChoiceField(queryset=Person.objects.all())
- person1 = Writer.objects.create(name="Person 1")
- form = WriterForm(data={})
+ person1 = Person.objects.create(name='Person 1')
+ form = PersonForm(data={})
queryset = form.fields['persons'].clean([str(person1.pk)] * 50)
sql, params = queryset.query.sql_with_params()
self.assertEqual(len(params), 1)
