1
0
mirror of https://github.com/django/django.git synced 2025-10-24 06:06:09 +00:00

Fixed #15201: Marked CACHE_MIDDLEWARE_ANONYMOUS_ONLY as deprecated

This commit is contained in:
Łukasz Langa
2013-05-18 16:10:14 +02:00
committed by Aymeric Augustin
parent 398841d6d3
commit bd97f7d0cb
7 changed files with 39 additions and 25 deletions

View File

@@ -28,8 +28,8 @@ from django.middleware.cache import (FetchFromCacheMiddleware,
from django.template import Template
from django.template.response import TemplateResponse
from django.test import TestCase, TransactionTestCase, RequestFactory
from django.test.utils import override_settings, six
from django.utils import timezone, translation, unittest
from django.test.utils import override_settings, IgnorePendingDeprecationWarningsMixin
from django.utils import six, timezone, translation, unittest
from django.utils.cache import (patch_vary_headers, get_cache_key,
learn_cache_key, patch_cache_control, patch_response_headers)
from django.utils.encoding import force_text
@@ -1592,9 +1592,10 @@ def hello_world_view(request, value):
},
},
)
class CacheMiddlewareTest(TestCase):
class CacheMiddlewareTest(IgnorePendingDeprecationWarningsMixin, TestCase):
def setUp(self):
super(CacheMiddlewareTest, self).setUp()
self.factory = RequestFactory()
self.default_cache = get_cache('default')
self.other_cache = get_cache('other')
@@ -1602,6 +1603,7 @@ class CacheMiddlewareTest(TestCase):
def tearDown(self):
self.default_cache.clear()
self.other_cache.clear()
super(CacheMiddlewareTest, self).tearDown()
def test_constructor(self):
"""