backend/image_markuper/conftest.py

15 lines
296 B
Python
Raw Normal View History

2022-10-25 23:29:13 +03:00
import pytest
from image_markuper.users.models import User
from image_markuper.users.tests.factories import UserFactory
@pytest.fixture(autouse=True)
def media_storage(settings, tmpdir):
settings.MEDIA_ROOT = tmpdir.strpath
@pytest.fixture
def user(db) -> User:
return UserFactory()