diff --git a/tests/admin_views/admin.py b/tests/admin_views/admin.py
index 367ac3d..b13bd32 100644
a
|
b
|
class ThingAdmin(admin.ModelAdmin):
|
169 | 169 | |
170 | 170 | |
171 | 171 | class InquisitionAdmin(admin.ModelAdmin): |
172 | | list_display = ('leader', 'country', 'expected') |
| 172 | list_display = ('leader', 'country', 'expected', 'sketch') |
| 173 | |
| 174 | def sketch(self, obj): |
| 175 | # A method with the same name as a reverse accessor. |
| 176 | return 'list-display-sketch' |
173 | 177 | |
174 | 178 | |
175 | 179 | class SketchAdmin(admin.ModelAdmin): |
diff --git a/tests/admin_views/tests.py b/tests/admin_views/tests.py
index 9e6c349..ef16eb7 100644
a
|
b
|
class RawIdFieldsTest(TestCase):
|
4882 | 4882 | self.assertNotContains(response2, "Kilbraken") |
4883 | 4883 | self.assertContains(response2, "Palin") |
4884 | 4884 | |
| 4885 | def test_list_display_method_same_name_as_reverse_accessor(self): |
| 4886 | actor = Actor.objects.create(name="Palin", age=27) |
| 4887 | Inquisition.objects.create(expected=True, leader=actor, country="England") |
| 4888 | response = self.client.get(reverse('admin:admin_views_inquisition_changelist')) |
| 4889 | self.assertContains(response, 'list-display-sketch') |
| 4890 | |
4885 | 4891 | |
4886 | 4892 | @override_settings(PASSWORD_HASHERS=['django.contrib.auth.hashers.SHA1PasswordHasher'], |
4887 | 4893 | ROOT_URLCONF="admin_views.urls") |