diff --git a/tests/admin_filters/tests.py b/tests/admin_filters/tests.py index 294793e7491..287fcfc1427 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)