Skip to content

Commit 3a6d808

Browse files
committed
Replace deprecated STATICFILES_STORAGE setting with STORAGES
1 parent ea4ddb1 commit 3a6d808

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

tcms/core/tests/test_collectstatic.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ class TestCollectstatic(TestCase):
1010
"""
1111
Test manage.py collectstatic --noinput --link
1212
13-
with different versions of STATICFILES_STORAGE. See
13+
with different versions of STORAGES["staticfiles"]. See
1414
https://github.com/sehmaschine/django-grappelli/issues/1022
1515
"""
1616

@@ -23,7 +23,11 @@ class TestCollectstatic(TestCase):
2323
)
2424
def test_collect_static(self, storage): # pylint: disable=no-self-use
2525
with override_settings(
26-
STATICFILES_STORAGE=storage,
26+
STORAGES={
27+
"staticfiles": {
28+
"BACKEND": storage,
29+
},
30+
},
2731
STATIC_ROOT=tempfile.mkdtemp(),
2832
STATICFILES_DIRS=[ # pylint: disable=avoid-list-comprehension
2933
dir

tcms/settings/devel.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@
4141
# http://docs.djangoproject.com/en/dev/ref/templates/api/#django-template-context-processors-debug
4242
INTERNAL_IPS = ("127.0.0.1",)
4343

44-
STATICFILES_STORAGE = "tcms.tests.storage.RaiseWhenFileNotFound"
44+
STORAGES["staticfiles"][ # noqa: F405
45+
"BACKEND"
46+
] = "tcms.tests.storage.RaiseWhenFileNotFound"
4547

4648
ANONYMOUS_ANALYTICS = False

0 commit comments

Comments
 (0)