From 8c1cc4b3b04f639ae40bc806380bc4a9dd568eb0 Mon Sep 17 00:00:00 2001 From: Mathijs de Bruin Date: Sat, 23 Feb 2013 16:33:28 +0100 Subject: [PATCH] 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. --- django/contrib/sessions/tests.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/django/contrib/sessions/tests.py b/django/contrib/sessions/tests.py index da79ac9de60..8bcc505ee6f 100644 --- a/django/contrib/sessions/tests.py +++ b/django/contrib/sessions/tests.py @@ -468,6 +468,9 @@ class CacheSessionTests(SessionTestsMixin, unittest.TestCase): }, }, SESSION_CACHE_ALIAS='sessions') 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.assertEqual(get_cache('default').get(self.session.cache_key), None) self.assertNotEqual(get_cache('sessions').get(self.session.cache_key), None)