summaryrefslogtreecommitdiff
path: root/tests/admin_views
diff options
context:
space:
mode:
authorTim Graham <timograham@gmail.com>2018-12-27 20:41:54 -0500
committerTim Graham <timograham@gmail.com>2019-01-17 10:52:19 -0500
commit92d4d0859a63347de6e2a7bc3ddd49979cc192c5 (patch)
treee8257beec76b3e488beca0b1e3f783fc1234aa45 /tests/admin_views
parent958a7b4ca69434d0145fd569cf007e21841bb36c (diff)
Refs #21221 -- Removed staticfiles and admin_static template tag libraries.
Per deprecation timeline.
Diffstat (limited to 'tests/admin_views')
-rw-r--r--tests/admin_views/test_static_deprecation.py24
1 files changed, 0 insertions, 24 deletions
diff --git a/tests/admin_views/test_static_deprecation.py b/tests/admin_views/test_static_deprecation.py
deleted file mode 100644
index 166e27ef37..0000000000
--- a/tests/admin_views/test_static_deprecation.py
+++ /dev/null
@@ -1,24 +0,0 @@
-from django.contrib.admin.templatetags.admin_static import static
-from django.contrib.staticfiles.storage import staticfiles_storage
-from django.test import SimpleTestCase
-from django.utils.deprecation import RemovedInDjango30Warning
-
-
-class AdminStaticDeprecationTests(SimpleTestCase):
- def test(self):
- """
- admin_static.static points to the collectstatic version
- (as django.contrib.collectstatic is in INSTALLED_APPS).
- """
- msg = (
- '{% load admin_static %} is deprecated in favor of '
- '{% load static %}.'
- )
- old_url = staticfiles_storage.base_url
- staticfiles_storage.base_url = '/test/'
- try:
- with self.assertWarnsMessage(RemovedInDjango30Warning, msg):
- url = static('path')
- self.assertEqual(url, '/test/path')
- finally:
- staticfiles_storage.base_url = old_url