mirror of https://github.com/django/django.git
Fixed test_clean_does_deduplicate_values on Oracle after e13cfc6dfd
.
This commit is contained in:
parent
8984cab8a8
commit
09914ccf68
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue