|
@@ -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):
|
|
|
"""
|