mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2025-02-10 08:30:50 +03:00
21 lines
445 B
Python
21 lines
445 B
Python
import pytest
|
|
from django.conf import settings
|
|
from django.test import RequestFactory
|
|
|
|
from {{ cookiecutter.project_slug }}.users.tests.factories import UserFactory
|
|
|
|
|
|
@pytest.fixture(autouse=True)
|
|
def media_storage(settings, tmpdir):
|
|
settings.MEDIA_ROOT = tmpdir.strpath
|
|
|
|
|
|
@pytest.fixture
|
|
def user() -> settings.AUTH_USER_MODEL:
|
|
return UserFactory()
|
|
|
|
|
|
@pytest.fixture
|
|
def request_factory() -> RequestFactory:
|
|
return RequestFactory()
|