Fixed #23380 -- Fixed flaky test: admin_filters.tests.ListFiltersTests.test_relatedfield

This commit is contained in:
Baylee Feore 2014-09-05 16:10:00 -07:00 committed by Tim Graham
parent fb545e5a27
commit f7d3a6255c
1 changed files with 1 additions and 1 deletions

View File

@ -402,7 +402,7 @@ class ListFiltersTests(TestCase):
# Make sure that all users are present in the author's list filter # Make sure that all users are present in the author's list filter
filterspec = changelist.get_filters(request)[0][1] filterspec = changelist.get_filters(request)[0][1]
expected = [(self.alfred.pk, 'alfred'), (self.bob.pk, 'bob'), (self.lisa.pk, 'lisa')] 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'}) request = self.request_factory.get('/', {'author__isnull': 'True'})
changelist = self.get_changelist(request, Book, modeladmin) changelist = self.get_changelist(request, Book, modeladmin)