From 32940d390a00a30a6409282d314d617667892841 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jaros=C5=82aw=20Wygoda?= Date: Sun, 11 Sep 2022 17:33:47 +0200 Subject: Refs #26029 -- Deprecated DEFAULT_FILE_STORAGE and STATICFILES_STORAGE settings. --- tests/file_uploads/tests.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'tests/file_uploads') diff --git a/tests/file_uploads/tests.py b/tests/file_uploads/tests.py index f3d926ac5f..693efc4c62 100644 --- a/tests/file_uploads/tests.py +++ b/tests/file_uploads/tests.py @@ -9,6 +9,7 @@ from io import BytesIO, StringIO from unittest import mock from urllib.parse import quote +from django.conf import DEFAULT_STORAGE_ALIAS from django.core.exceptions import SuspiciousFileOperation from django.core.files import temp as tempfile from django.core.files.storage import default_storage @@ -806,7 +807,11 @@ class DirectoryCreationTests(SimpleTestCase): sys.platform == "win32", "Python on Windows doesn't have working os.chmod()." ) @override_settings( - DEFAULT_FILE_STORAGE="django.core.files.storage.FileSystemStorage" + STORAGES={ + DEFAULT_STORAGE_ALIAS: { + "BACKEND": "django.core.files.storage.FileSystemStorage", + } + } ) def test_readonly_root(self): """Permission errors are not swallowed""" -- cgit v1.2.1