mirror of
https://github.com/django/django.git
synced 2025-08-03 18:38:50 +00:00
Refs #32508 -- Raised ImproperlyConfigured instead of using "assert" in SessionStorage.
This commit is contained in:
parent
330bc402a8
commit
54d9179540
2 changed files with 9 additions and 5 deletions
|
@ -1,6 +1,7 @@
|
|||
from django.contrib.messages import constants
|
||||
from django.contrib.messages.storage.base import Message
|
||||
from django.contrib.messages.storage.session import SessionStorage
|
||||
from django.core.exceptions import ImproperlyConfigured
|
||||
from django.http import HttpRequest
|
||||
from django.test import TestCase
|
||||
from django.utils.safestring import SafeData, mark_safe
|
||||
|
@ -41,7 +42,7 @@ class SessionTests(BaseTests, TestCase):
|
|||
'middleware to be installed, and come before the message '
|
||||
'middleware in the MIDDLEWARE list.'
|
||||
)
|
||||
with self.assertRaisesMessage(AssertionError, msg):
|
||||
with self.assertRaisesMessage(ImproperlyConfigured, msg):
|
||||
self.storage_class(HttpRequest())
|
||||
|
||||
def test_get(self):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue