diff --git a/tests/regressiontests/admin_filters/tests.py b/tests/regressiontests/admin_filters/tests.py index b4c4f34e75..fd82a7aba3 100644 --- a/tests/regressiontests/admin_filters/tests.py +++ b/tests/regressiontests/admin_filters/tests.py @@ -7,7 +7,8 @@ from django.utils.encoding import force_unicode from django.contrib.auth.admin import UserAdmin from django.contrib.auth.models import User from django.contrib.admin.views.main import ChangeList -from django.contrib.admin import site, ModelAdmin, SimpleListFilter +from django.contrib.admin import (site, ModelAdmin, SimpleListFilter, + BooleanFieldListFilter) from models import Book @@ -67,6 +68,9 @@ class BookAdmin(ModelAdmin): list_filter = ('year', 'author', 'contributors', 'is_best_seller', 'date_registered', 'no') ordering = ('-id',) +class BookAdminWithTupleBooleanFilter(BookAdmin): + list_filter = ('year', 'author', 'contributors', ('is_best_seller', BooleanFieldListFilter), 'date_registered', 'no') + class DecadeFilterBookAdmin(ModelAdmin): list_filter = ('author', DecadeListFilterWithTitleAndParameter) ordering = ('-id',) @@ -331,7 +335,7 @@ class ListFiltersTests(TestCase): self.verify_booleanfieldlistfilter(modeladmin) def test_booleanfieldlistfilter_tuple(self): - modeladmin = BookAdmin(Book, site) + modeladmin = BookAdminWithTupleBooleanFilter(Book, site) self.verify_booleanfieldlistfilter(modeladmin) def verify_booleanfieldlistfilter(self, modeladmin):