From 17d75472f0d74792ae3195b01e23233cc84d4d96 Mon Sep 17 00:00:00 2001 From: Mariusz Felisiak Date: Thu, 16 Mar 2017 16:14:51 +0100 Subject: [PATCH] [1.11.x] Fixed nondeterministic ordering test failure in model_forms. Backport of 2767ef3ca7 from master --- tests/model_forms/tests.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/model_forms/tests.py b/tests/model_forms/tests.py index 49ed9f03dd..2ff4435385 100644 --- a/tests/model_forms/tests.py +++ b/tests/model_forms/tests.py @@ -1971,7 +1971,7 @@ class ModelMultipleChoiceFieldTests(TestCase): ) article.categories.add(self.c2, self.c3) form = ArticleCategoriesForm(instance=article) - self.assertEqual(form['categories'].value(), [self.c2.slug, self.c3.slug]) + self.assertCountEqual(form['categories'].value(), [self.c2.slug, self.c3.slug]) class ModelOneToOneFieldTests(TestCase):