1
0
mirror of https://github.com/django/django.git synced 2025-10-26 07:06:08 +00:00

Refs #26029 -- Removed DEFAULT_FILE_STORAGE and STATICFILES_STORAGE settings.

This also removes django.core.files.storage.get_storage_class().

Per deprecation timeline.
This commit is contained in:
Mariusz Felisiak
2023-09-15 05:58:54 +02:00
parent 3a3e737694
commit f72f420f17
16 changed files with 39 additions and 556 deletions

View File

@@ -142,11 +142,12 @@ class TestConfiguration(StaticFilesTestCase):
storage.staticfiles_storage._wrapped = empty
with self.settings(
STORAGES={
**settings.STORAGES,
STATICFILES_STORAGE_ALIAS: {
"BACKEND": (
"django.contrib.staticfiles.storage.StaticFilesStorage"
)
}
},
}
):
command = collectstatic.Command()
@@ -155,9 +156,10 @@ class TestConfiguration(StaticFilesTestCase):
storage.staticfiles_storage._wrapped = empty
with self.settings(
STORAGES={
**settings.STORAGES,
STATICFILES_STORAGE_ALIAS: {
"BACKEND": "staticfiles_tests.storage.DummyStorage"
}
},
}
):
command = collectstatic.Command()
@@ -250,6 +252,7 @@ class TestCollectionVerbosity(CollectionTestCase):
@override_settings(
STORAGES={
**settings.STORAGES,
STATICFILES_STORAGE_ALIAS: {
"BACKEND": (
"django.contrib.staticfiles.storage.ManifestStaticFilesStorage"
@@ -264,6 +267,7 @@ class TestCollectionVerbosity(CollectionTestCase):
@override_settings(
STORAGES={
**settings.STORAGES,
STATICFILES_STORAGE_ALIAS: {
"BACKEND": (
"django.contrib.staticfiles.storage.ManifestStaticFilesStorage"
@@ -297,6 +301,7 @@ class TestCollectionClear(CollectionTestCase):
@override_settings(
STORAGES={
**settings.STORAGES,
STATICFILES_STORAGE_ALIAS: {
"BACKEND": "staticfiles_tests.storage.PathNotImplementedStorage"
},
@@ -416,6 +421,7 @@ class TestCollectionDryRun(TestNoFilesCreated, CollectionTestCase):
@override_settings(
STORAGES={
**settings.STORAGES,
STATICFILES_STORAGE_ALIAS: {
"BACKEND": "django.contrib.staticfiles.storage.ManifestStaticFilesStorage"
},
@@ -544,6 +550,7 @@ class TestCollectionOverwriteWarning(CollectionTestCase):
@override_settings(
STORAGES={
**settings.STORAGES,
STATICFILES_STORAGE_ALIAS: {
"BACKEND": "staticfiles_tests.storage.DummyStorage"
},
@@ -571,6 +578,7 @@ class TestCollectionNonLocalStorage(TestNoFilesCreated, CollectionTestCase):
class TestCollectionNeverCopyStorage(CollectionTestCase):
@override_settings(
STORAGES={
**settings.STORAGES,
STATICFILES_STORAGE_ALIAS: {
"BACKEND": "staticfiles_tests.storage.NeverCopyRemoteStorage"
},
@@ -642,9 +650,10 @@ class TestCollectionLinks(TestDefaults, CollectionTestCase):
@override_settings(
STORAGES={
**settings.STORAGES,
STATICFILES_STORAGE_ALIAS: {
"BACKEND": "staticfiles_tests.storage.PathNotImplementedStorage"
}
},
}
)
def test_no_remote_link(self):