mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
Refs #32508 -- Raised ImproperlyConfigured instead of using "assert" in middlewares.
This commit is contained in:
committed by
Mariusz Felisiak
parent
dc86a25a67
commit
a2d5ea626e
@@ -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/')
|
||||
|
||||
Reference in New Issue
Block a user