diff options
author | Jarosław Wygoda <jaroslaw@wygoda.me> | 2022-09-11 17:33:47 +0200 |
---|---|---|
committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2023-01-12 09:58:36 +0100 |
commit | 32940d390a00a30a6409282d314d617667892841 (patch) | |
tree | 3912c57c1b553833a8a798d92a33147fb87b3f0b /tests/file_uploads | |
parent | 1ec3f0961fedbe01f174b78ef2805a9d4f3844b1 (diff) | |
download | django-32940d390a00a30a6409282d314d617667892841.tar.gz |
Refs #26029 -- Deprecated DEFAULT_FILE_STORAGE and STATICFILES_STORAGE settings.
Diffstat (limited to 'tests/file_uploads')
-rw-r--r-- | tests/file_uploads/tests.py | 7 |
1 files changed, 6 insertions, 1 deletions
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""" |