Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Utiliser la fixture settings dans les tests au lieu de modifier les settings django #4472

Merged
merged 1 commit into from
Jul 30, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,8 +172,8 @@ def django_loaddata_fixture(django_db_setup, django_db_blocker):
)


@pytest.fixture(autouse=True, scope="session")
def django_test_environment_email_fixup(django_test_environment) -> None:
@pytest.fixture(autouse=True)
def django_test_environment_email_fixup(django_test_environment, settings) -> None:
# Django forcefully sets the EMAIL_BACKEND to
# "django.core.mail.backends.locmem.EmailBackend" in
# django.test.utils.setup_test_environment.
Expand Down