summaryrefslogtreecommitdiff
path: root/tests/admin_views
diff options
context:
space:
mode:
authorRaffaele Salmaso <raffaele@salmaso.org>2020-09-23 09:42:13 +0200
committerMariusz Felisiak <felisiak.mariusz@gmail.com>2020-09-23 10:01:03 +0200
commit666f2e8acdda690f5a87fc5838e36b0c972093ac (patch)
treec3f1c57f4933e006e0574fd998fe701990f20c4f /tests/admin_views
parent71d10ca8c90ccc1fd0ccd6683716dd3c3116ae6a (diff)
downloaddjango-666f2e8acdda690f5a87fc5838e36b0c972093ac.tar.gz
Refs #32034 -- Added test for title on admin app index view.
Diffstat (limited to 'tests/admin_views')
-rw-r--r--tests/admin_views/tests.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/admin_views/tests.py b/tests/admin_views/tests.py
index 89ae04ff56..6842b02d3e 100644
--- a/tests/admin_views/tests.py
+++ b/tests/admin_views/tests.py
@@ -1033,6 +1033,15 @@ class AdminViewBasicTest(AdminViewBasicTestCase):
self.assertContains(response, '<th scope="col" class="column-value">')
self.assertNotContains(response, '<th scope="col" class="sortable column')
+ def test_app_index_context(self):
+ response = self.client.get(reverse('admin:app_list', args=('admin_views',)))
+ self.assertContains(
+ response,
+ '<title>Admin_Views administration | Django site admin</title>',
+ )
+ self.assertEqual(response.context['title'], 'Admin_Views administration')
+ self.assertEqual(response.context['app_label'], 'admin_views')
+
def test_change_view_subtitle_per_object(self):
response = self.client.get(
reverse('admin:admin_views_article_change', args=(self.a1.pk,)),