From 09914ccf688974e068941f55412b930729bafa06 Mon Sep 17 00:00:00 2001 From: Mariusz Felisiak Date: Fri, 26 Jun 2020 22:37:58 +0200 Subject: [PATCH] Fixed test_clean_does_deduplicate_values on Oracle after e13cfc6dfd4212ef7a40db1a41d3ae6ac4b97de0. --- tests/model_forms/tests.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/model_forms/tests.py b/tests/model_forms/tests.py index 42ea63dd4d..914defe5e7 100644 --- a/tests/model_forms/tests.py +++ b/tests/model_forms/tests.py @@ -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)