summaryrefslogtreecommitdiff
path: root/tests/admin_docs
diff options
context:
space:
mode:
authorHasan Ramezani <hasan.r67@gmail.com>2021-03-10 14:08:37 +0100
committerMariusz Felisiak <felisiak.mariusz@gmail.com>2021-03-11 08:34:28 +0100
commita2d5ea626ec6aa4eab6b018c4bce58cb27e20676 (patch)
tree0a76e91b333d863300d771c8a4486a3e753023d6 /tests/admin_docs
parentdc86a25a677d05703e0bb021b178e44412cea7e9 (diff)
downloaddjango-a2d5ea626ec6aa4eab6b018c4bce58cb27e20676.tar.gz
Refs #32508 -- Raised ImproperlyConfigured instead of using "assert" in middlewares.
Diffstat (limited to 'tests/admin_docs')
-rw-r--r--tests/admin_docs/test_middleware.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/admin_docs/test_middleware.py b/tests/admin_docs/test_middleware.py
index 9f5f19fa32..5d737f1bfd 100644
--- a/tests/admin_docs/test_middleware.py
+++ b/tests/admin_docs/test_middleware.py
@@ -1,4 +1,5 @@
from django.contrib.auth.models import User
+from django.core.exceptions import ImproperlyConfigured
from django.test import override_settings
from .tests import AdminDocsTestCase, TestDataMixin
@@ -54,5 +55,5 @@ class XViewMiddlewareTest(TestDataMixin, AdminDocsTestCase):
"installed. Edit your MIDDLEWARE setting to insert "
"'django.contrib.auth.middleware.AuthenticationMiddleware'."
)
- with self.assertRaisesMessage(AssertionError, msg):
+ with self.assertRaisesMessage(ImproperlyConfigured, msg):
self.client.head('/xview/func/')