summaryrefslogtreecommitdiff
path: root/tests/model_forms/tests.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/model_forms/tests.py')
-rw-r--r--tests/model_forms/tests.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/model_forms/tests.py b/tests/model_forms/tests.py
index 0d54cead70..a8617444c5 100644
--- a/tests/model_forms/tests.py
+++ b/tests/model_forms/tests.py
@@ -2070,7 +2070,7 @@ class ModelMultipleChoiceFieldTests(TestCase):
def test_model_multiple_choice_field(self):
f = forms.ModelMultipleChoiceField(Category.objects.all())
- self.assertEqual(
+ self.assertCountEqual(
list(f.choices),
[
(self.c1.pk, "Entertainment"),
@@ -2139,7 +2139,7 @@ class ModelMultipleChoiceFieldTests(TestCase):
# queryset can be changed after the field is created.
f.queryset = Category.objects.exclude(name="Third")
- self.assertEqual(
+ self.assertCountEqual(
list(f.choices),
[(self.c1.pk, "Entertainment"), (self.c2.pk, "It's a test")],
)
@@ -2151,7 +2151,7 @@ class ModelMultipleChoiceFieldTests(TestCase):
f.queryset = Category.objects.all()
f.label_from_instance = lambda obj: "multicategory " + str(obj)
- self.assertEqual(
+ self.assertCountEqual(
list(f.choices),
[
(self.c1.pk, "multicategory Entertainment"),