backend/marking_hack/conftest.py

15 lines
292 B
Python
Raw Normal View History

2023-03-26 14:16:18 +03:00
import pytest
from marking_hack.users.models import User
from marking_hack.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()