Customise MEDIA_URL setting instead of using fixture

This commit is contained in:
Bruno Alla 2023-08-28 14:07:48 +01:00
parent f3909e6e80
commit 5e11a8f1fd
No known key found for this signature in database
2 changed files with 5 additions and 5 deletions

View File

@ -29,6 +29,11 @@ EMAIL_BACKEND = "django.core.mail.backends.locmem.EmailBackend"
# ------------------------------------------------------------------------------
TEMPLATES[0]["OPTIONS"]["debug"] = True # type: ignore # noqa: F405
# MEDIA
# ------------------------------------------------------------------------------
# https://docs.djangoproject.com/en/dev/ref/settings/#media-url
MEDIA_URL = 'http://media.testserver'
{%- if cookiecutter.frontend_pipeline == 'Webpack' %}
# django-webpack-loader
# ------------------------------------------------------------------------------

View File

@ -9,11 +9,6 @@ def media_storage(settings, tmpdir):
settings.MEDIA_ROOT = tmpdir.strpath
@pytest.fixture(autouse=True)
def media_url(settings):
settings.MEDIA_URL = 'http://testserver'
@pytest.fixture
def user(db) -> User:
return UserFactory()