1
0
mirror of https://github.com/django/django.git synced 2025-10-23 21:59:11 +00:00

Fixed #29296 -- Fixed crashes in admindocs when a view is a callable object.

This commit is contained in:
Paul Donohue
2018-04-08 13:35:24 -04:00
committed by Tim Graham
parent ee17bb8a67
commit 33a0b7ac81
10 changed files with 37 additions and 7 deletions

View File

@@ -40,3 +40,8 @@ class XViewMiddlewareTest(TestDataMixin, AdminDocsTestCase):
user.save()
response = self.client.head('/xview/class/')
self.assertNotIn('X-View', response)
def test_callable_object_view(self):
self.client.force_login(self.superuser)
response = self.client.head('/xview/callable_object/')
self.assertEqual(response['X-View'], 'admin_docs.views.XViewCallableObject')