summaryrefslogtreecommitdiff
path: root/tests/admin_checks/tests.py
diff options
context:
space:
mode:
authorJon Dufresne <jon.dufresne@gmail.com>2020-05-14 10:27:35 +0200
committerMariusz Felisiak <felisiak.mariusz@gmail.com>2020-05-14 11:00:51 +0200
commitd522b51c401429c169d88742178a9b3777903d9e (patch)
tree3906605a21d2e83dbc44642bef2685432c4e141d /tests/admin_checks/tests.py
parente341bed606d8ab2864838795276692cf86b08687 (diff)
Fixed #31575 -- Added system check for admin sidebar request context processor dependency.
Co-authored-by: Carlton Gibson <carlton.gibson@noumenal.es>
Diffstat (limited to 'tests/admin_checks/tests.py')
-rw-r--r--tests/admin_checks/tests.py12
1 files changed, 11 insertions, 1 deletions
diff --git a/tests/admin_checks/tests.py b/tests/admin_checks/tests.py
index 2a9643cd95..52f2188c9f 100644
--- a/tests/admin_checks/tests.py
+++ b/tests/admin_checks/tests.py
@@ -134,6 +134,12 @@ class SystemChecksTestCase(SimpleTestCase):
"be enabled in DjangoTemplates (TEMPLATES) in order to use "
"the admin application.",
id='admin.E404',
+ ),
+ checks.Warning(
+ "'django.template.context_processors.request' must be enabled "
+ "in DjangoTemplates (TEMPLATES) in order to use the admin "
+ "navigation sidebar.",
+ id='admin.W411',
)
]
self.assertEqual(admin.checks.check_dependencies(), expected)
@@ -150,7 +156,10 @@ class SystemChecksTestCase(SimpleTestCase):
'DIRS': [],
'APP_DIRS': True,
'OPTIONS': {
- 'context_processors': ['django.contrib.messages.context_processors.messages'],
+ 'context_processors': [
+ 'django.template.context_processors.request',
+ 'django.contrib.messages.context_processors.messages',
+ ],
},
}],
)
@@ -177,6 +186,7 @@ class SystemChecksTestCase(SimpleTestCase):
'APP_DIRS': True,
'OPTIONS': {
'context_processors': [
+ 'django.template.context_processors.request',
'django.contrib.auth.context_processors.auth',
'django.contrib.messages.context_processors.messages',
],