From f7d3a6255c7ae3beb9ccdf6d20f6598061cd1bff Mon Sep 17 00:00:00 2001 From: Baylee Feore Date: Fri, 5 Sep 2014 16:10:00 -0700 Subject: [PATCH] Fixed #23380 -- Fixed flaky test: admin_filters.tests.ListFiltersTests.test_relatedfield --- tests/admin_filters/tests.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/admin_filters/tests.py b/tests/admin_filters/tests.py index 294793e749..287fcfc142 100644 --- a/tests/admin_filters/tests.py +++ b/tests/admin_filters/tests.py @@ -402,7 +402,7 @@ class ListFiltersTests(TestCase): # Make sure that all users are present in the author's list filter filterspec = changelist.get_filters(request)[0][1] expected = [(self.alfred.pk, 'alfred'), (self.bob.pk, 'bob'), (self.lisa.pk, 'lisa')] - self.assertEqual(filterspec.lookup_choices, expected) + self.assertEqual(sorted(filterspec.lookup_choices), sorted(expected)) request = self.request_factory.get('/', {'author__isnull': 'True'}) changelist = self.get_changelist(request, Book, modeladmin)