summaryrefslogtreecommitdiff
path: root/tests/admin_checks
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:01:22 +0200
commit1c2d0fdf3eb903d2323b39e0ca596e5322922a87 (patch)
treea9f9a66c3142f31543885946c2ceaae1ec63d700 /tests/admin_checks
parentc9a9d042e5182cfb6c9aceaf292e5e3727f624dd (diff)
[3.1.x] Fixed #31575 -- Added system check for admin sidebar request context processor dependency.
Co-authored-by: Carlton Gibson <carlton.gibson@noumenal.es> Backport of d522b51c401429c169d88742178a9b3777903d9e from master
Diffstat (limited to 'tests/admin_checks')
-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',
],