mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2025-08-14 08:54: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
|
settings.MEDIA_ROOT = tmpdir.strpath
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.fixture(autouse=True)
|
||||||
|
def media_url(settings):
|
||||||
|
settings.MEDIA_URL = 'http://testserver'
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture
|
@pytest.fixture
|
||||||
def user(db) -> User:
|
def user(db) -> User:
|
||||||
return UserFactory()
|
return UserFactory()
|
||||||
|
|
Loading…
Reference in New Issue
Block a user