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/staticfiles_tests/test_forms.py | |
| parent | 1ec3f0961fedbe01f174b78ef2805a9d4f3844b1 (diff) | |
Refs #26029 -- Deprecated DEFAULT_FILE_STORAGE and STATICFILES_STORAGE settings.
Diffstat (limited to 'tests/staticfiles_tests/test_forms.py')
| -rw-r--r-- | tests/staticfiles_tests/test_forms.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/tests/staticfiles_tests/test_forms.py b/tests/staticfiles_tests/test_forms.py index ad662d7321..489140a62c 100644 --- a/tests/staticfiles_tests/test_forms.py +++ b/tests/staticfiles_tests/test_forms.py @@ -1,5 +1,6 @@ from urllib.parse import urljoin +from django.conf import STATICFILES_STORAGE_ALIAS from django.contrib.staticfiles import storage from django.forms import Media from django.templatetags.static import static @@ -12,9 +13,13 @@ class StaticTestStorage(storage.StaticFilesStorage): @override_settings( - STATIC_URL="http://media.example.com/static/", INSTALLED_APPS=("django.contrib.staticfiles",), - STATICFILES_STORAGE="staticfiles_tests.test_forms.StaticTestStorage", + STORAGES={ + STATICFILES_STORAGE_ALIAS: { + "BACKEND": "staticfiles_tests.test_forms.StaticTestStorage", + "OPTIONS": {"location": "http://media.example.com/static/"}, + } + }, ) class StaticFilesFormsMediaTestCase(SimpleTestCase): def test_absolute_url(self): |
