17 lines
353 B
Python
17 lines
353 B
Python
import pytest
|
|
|
|
import django_webtest
|
|
|
|
|
|
@pytest.fixture
|
|
def app(request):
|
|
wtm = django_webtest.WebTestMixin()
|
|
wtm._patch_settings()
|
|
request.addfinalizer(wtm._unpatch_settings)
|
|
return django_webtest.DjangoTestApp()
|
|
|
|
|
|
@pytest.fixture(autouse=True)
|
|
def media_root(settings, tmpdir):
|
|
settings.MEDIA_ROOT = str(tmpdir.mkdir('media_root'))
|