Skip to content
Browse files

Fixed #10853 -- Skipped some sessions tests with dummy cache backend

  • Loading branch information...
1 parent e758ecc commit 486e67598f8d8e83890ef3c90399d660d8e9eee6 @claudep claudep committed
Showing with 6 additions and 0 deletions.
  1. +6 −0 django/contrib/sessions/
6 django/contrib/sessions/
@@ -12,6 +12,7 @@
from django.contrib.sessions.backends.signed_cookies import SessionStore as CookieSession
from django.contrib.sessions.models import Session
from django.contrib.sessions.middleware import SessionMiddleware
+from django.core.cache import DEFAULT_CACHE_ALIAS
from django.core.exceptions import ImproperlyConfigured, SuspiciousOperation
from django.http import HttpResponse
from django.test import TestCase, RequestFactory
@@ -133,6 +134,9 @@ def test_clear(self):
def test_save(self):
+ if (hasattr(self.session, '_cache') and
+ 'DummyCache' in settings.CACHES[DEFAULT_CACHE_ALIAS]['BACKEND']):
+ raise unittest.SkipTest("Session saving tests require a real cache backend")
@@ -296,6 +300,8 @@ class CacheDBSessionTests(SessionTestsMixin, TestCase):
backend = CacheDBSession
+ @unittest.skipIf('DummyCache' in settings.CACHES[DEFAULT_CACHE_ALIAS]['BACKEND'],
+ "Session saving tests require a real cache backend")
def test_exists_searches_cache_first(self):
with self.assertNumQueries(0):

0 comments on commit 486e675

Please sign in to comment.
Something went wrong with that request. Please try again.