mirror of https://github.com/django/django.git
Fixed regression introduced in 146ed13a
.
As override_settings was used after the initialization of the session backend, we need to use a new session backend here.
This commit is contained in:
parent
5278776a88
commit
8c1cc4b3b0
|
@ -468,6 +468,9 @@ class CacheSessionTests(SessionTestsMixin, unittest.TestCase):
|
||||||
},
|
},
|
||||||
}, SESSION_CACHE_ALIAS='sessions')
|
}, SESSION_CACHE_ALIAS='sessions')
|
||||||
def test_non_default_cache(self):
|
def test_non_default_cache(self):
|
||||||
|
# Re-initalize the session backend to make use of overridden settings.
|
||||||
|
self.session = self.backend()
|
||||||
|
|
||||||
self.session.save()
|
self.session.save()
|
||||||
self.assertEqual(get_cache('default').get(self.session.cache_key), None)
|
self.assertEqual(get_cache('default').get(self.session.cache_key), None)
|
||||||
self.assertNotEqual(get_cache('sessions').get(self.session.cache_key), None)
|
self.assertNotEqual(get_cache('sessions').get(self.session.cache_key), None)
|
||||||
|
|
Loading…
Reference in New Issue