Kaydet (Commit) 8c1cc4b3 authored tarafından Mathijs de Bruin's avatar Mathijs de Bruin Kaydeden (comit) Aymeric Augustin

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.
üst 5278776a
...@@ -468,6 +468,9 @@ class CacheSessionTests(SessionTestsMixin, unittest.TestCase): ...@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment