mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2025-08-13 16:34:52 +03:00
fixture for changing media url
This commit is contained in:
parent
69505fb7d6
commit
bbfa6875ff
|
@ -9,6 +9,11 @@ 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()
|
||||
|
|
Loading…
Reference in New Issue
Block a user