cookiecutter-django/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/conftest.py
pyup.io bot dc0a511353
Update ruff to 0.6.0 (#5300)
* Update ruff from 0.5.7 to 0.6.0

* Update ruff from 0.5.7 to 0.6.0

* Update Ruff pre-commit hook

* Update pytest style to match update Ruff rules

* Switch Ruff setting from exclude to extend-exclude

* Omit default Ruff settings

---------

Co-authored-by: Bruno Alla <alla.brunoo@gmail.com>
2024-08-15 16:36:59 +01:00

15 lines
339 B
Python

import pytest
from {{ cookiecutter.project_slug }}.users.models import User
from {{ cookiecutter.project_slug }}.users.tests.factories import UserFactory
@pytest.fixture(autouse=True)
def _media_storage(settings, tmpdir) -> None:
settings.MEDIA_ROOT = tmpdir.strpath
@pytest.fixture
def user(db) -> User:
return UserFactory()