summaryrefslogtreecommitdiff
path: root/tests/cache
diff options
context:
space:
mode:
authorDenis Cornehl <syphar@fastmail.fm>2016-04-03 12:15:10 +0200
committerTim Graham <timograham@gmail.com>2016-10-10 14:55:59 -0400
commita840710e1e38bc9e55412bb36eca92eff94ebd2c (patch)
treeb6ab8b8456eea42645949cb46114fbab50aae0fa /tests/cache
parent46a3d7604e7fecde8df02ec363200ec5e0ce894e (diff)
Fixed #26447 -- Deprecated settings.USE_ETAGS in favor of ConditionalGetMiddleware.
Diffstat (limited to 'tests/cache')
-rw-r--r--tests/cache/tests.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/cache/tests.py b/tests/cache/tests.py
index 7ae39278fd..122017b54e 100644
--- a/tests/cache/tests.py
+++ b/tests/cache/tests.py
@@ -33,8 +33,8 @@ from django.template import engines
from django.template.context_processors import csrf
from django.template.response import TemplateResponse
from django.test import (
- RequestFactory, SimpleTestCase, TestCase, TransactionTestCase, mock,
- override_settings,
+ RequestFactory, SimpleTestCase, TestCase, TransactionTestCase,
+ ignore_warnings, mock, override_settings,
)
from django.test.signals import setting_changed
from django.utils import six, timezone, translation
@@ -1856,6 +1856,7 @@ class CacheI18nTest(TestCase):
"Cache keys should include the time zone name when time zones are active"
)
+ @ignore_warnings(category=RemovedInDjango21Warning) # USE_ETAGS=True
@override_settings(
CACHE_MIDDLEWARE_KEY_PREFIX="test",
CACHE_MIDDLEWARE_SECONDS=60,
@@ -2262,6 +2263,7 @@ class TestWithTemplateResponse(SimpleTestCase):
response = response.render()
self.assertFalse(response.has_header('ETag'))
+ @ignore_warnings(category=RemovedInDjango21Warning)
@override_settings(USE_ETAGS=True)
def test_with_etag(self):
template = engines['django'].from_string("This is a test")