diff options
| author | Denis Cornehl <syphar@fastmail.fm> | 2016-04-03 12:15:10 +0200 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2016-10-10 14:55:59 -0400 |
| commit | a840710e1e38bc9e55412bb36eca92eff94ebd2c (patch) | |
| tree | b6ab8b8456eea42645949cb46114fbab50aae0fa /tests/admin_views | |
| parent | 46a3d7604e7fecde8df02ec363200ec5e0ce894e (diff) | |
Fixed #26447 -- Deprecated settings.USE_ETAGS in favor of ConditionalGetMiddleware.
Diffstat (limited to 'tests/admin_views')
| -rw-r--r-- | tests/admin_views/tests.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/admin_views/tests.py b/tests/admin_views/tests.py index ba15e18a2c..3007764b5d 100644 --- a/tests/admin_views/tests.py +++ b/tests/admin_views/tests.py @@ -35,7 +35,9 @@ from django.urls import NoReverseMatch, resolve, reverse from django.utils import formats, six, translation from django.utils._os import upath from django.utils.cache import get_max_age -from django.utils.deprecation import RemovedInDjango20Warning +from django.utils.deprecation import ( + RemovedInDjango20Warning, RemovedInDjango21Warning, +) from django.utils.encoding import force_bytes, force_text, iri_to_uri from django.utils.html import escape from django.utils.http import urlencode @@ -6074,7 +6076,7 @@ class TestETagWithAdminView(SimpleTestCase): self.assertEqual(response.status_code, 302) self.assertFalse(response.has_header('ETag')) - with self.settings(USE_ETAGS=True): + with self.settings(USE_ETAGS=True), ignore_warnings(category=RemovedInDjango21Warning): response = self.client.get(reverse('admin:index')) self.assertEqual(response.status_code, 302) self.assertTrue(response.has_header('ETag')) |
