summaryrefslogtreecommitdiff
path: root/tests/test_utils
diff options
context:
space:
mode:
authorJarosław Wygoda <jaroslaw@wygoda.me>2022-09-11 17:33:47 +0200
committerMariusz Felisiak <felisiak.mariusz@gmail.com>2023-01-12 09:58:36 +0100
commit32940d390a00a30a6409282d314d617667892841 (patch)
tree3912c57c1b553833a8a798d92a33147fb87b3f0b /tests/test_utils
parent1ec3f0961fedbe01f174b78ef2805a9d4f3844b1 (diff)
downloaddjango-32940d390a00a30a6409282d314d617667892841.tar.gz
Refs #26029 -- Deprecated DEFAULT_FILE_STORAGE and STATICFILES_STORAGE settings.
Diffstat (limited to 'tests/test_utils')
-rw-r--r--tests/test_utils/tests.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/tests/test_utils/tests.py b/tests/test_utils/tests.py
index 79757045dd..a377479d38 100644
--- a/tests/test_utils/tests.py
+++ b/tests/test_utils/tests.py
@@ -5,7 +5,7 @@ import warnings
from io import StringIO
from unittest import mock
-from django.conf import settings
+from django.conf import STATICFILES_STORAGE_ALIAS, settings
from django.contrib.staticfiles.finders import get_finder, get_finders
from django.contrib.staticfiles.storage import staticfiles_storage
from django.core.exceptions import ImproperlyConfigured
@@ -2106,12 +2106,14 @@ class OverrideSettingsTests(SimpleTestCase):
def test_override_staticfiles_storage(self):
"""
- Overriding the STATICFILES_STORAGE setting should be reflected in
+ Overriding the STORAGES setting should be reflected in
the value of django.contrib.staticfiles.storage.staticfiles_storage.
"""
new_class = "ManifestStaticFilesStorage"
new_storage = "django.contrib.staticfiles.storage." + new_class
- with self.settings(STATICFILES_STORAGE=new_storage):
+ with self.settings(
+ STORAGES={STATICFILES_STORAGE_ALIAS: {"BACKEND": new_storage}}
+ ):
self.assertEqual(staticfiles_storage.__class__.__name__, new_class)
def test_override_staticfiles_finders(self):