diff options
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')) |
