From ca7d9fc08923e405a22f976f674c3d869348d287 Mon Sep 17 00:00:00 2001 From: Xavier Fernandez Date: Mon, 6 Nov 2023 15:06:06 +0100 Subject: [PATCH] conftest: remove workaround https://github.com/pytest-dev/pytest-django/pull/1076 has been merged & released (in 4.6.0). --- tests/conftest.py | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/tests/conftest.py b/tests/conftest.py index 92e6c8af7a..8205e10db3 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -246,22 +246,6 @@ def _fail_for_invalid_template_variable_improved(_fail_for_invalid_template_vari ) -@pytest.fixture(autouse=True) -def _template_string_if_invalid_marker(monkeypatch, request) -> None: - # TODO: remove me once https://github.com/pytest-dev/pytest-django/pull/1076 is merged & released - marker = request.keywords.get("ignore_template_errors", None) - if os.environ.get(INVALID_TEMPLATE_VARS_ENV, "false") == "true": - if marker and django_settings_is_configured(): - from django.conf import settings as dj_settings - - if dj_settings.TEMPLATES: - monkeypatch.setattr( - dj_settings.TEMPLATES[0]["OPTIONS"]["string_if_invalid"], - "fail", - False, - ) - - @pytest.fixture(scope="session", autouse=True) def make_unordered_queries_randomly_ordered(): """