Skip to content

Commit

Permalink
conftest: remove workaround
Browse files Browse the repository at this point in the history
pytest-dev/pytest-django#1076 has been merged &
released (in 4.6.0).
  • Loading branch information
xavfernandez committed Nov 6, 2023
1 parent d8c1f37 commit ca7d9fc
Showing 1 changed file with 0 additions and 16 deletions.
16 changes: 0 additions & 16 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -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():
"""
Expand Down

0 comments on commit ca7d9fc

Please sign in to comment.