Skip to content

Commit

Permalink
Yet more TEMPLATE_STRING_IF_INVALID removals
Browse files Browse the repository at this point in the history
  • Loading branch information
bluetech committed Oct 16, 2020
1 parent 002be61 commit 2e564f5
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions pytest_django/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -597,7 +597,6 @@ def __init__(self):
self.fail = True

def __contains__(self, key):
"""There is a test for '%s' in TEMPLATE_STRING_IF_INVALID."""
return key == "%s"

@staticmethod
Expand Down Expand Up @@ -635,7 +634,6 @@ def _get_origin():
return template.name

def __mod__(self, var):
"""Handle TEMPLATE_STRING_IF_INVALID % var."""
origin = self._get_origin()
if origin:
msg = "Undefined template variable '{}' in '{}'".format(var, origin)
Expand Down Expand Up @@ -667,8 +665,6 @@ def _template_string_if_invalid_marker(request):

if dj_settings.TEMPLATES:
dj_settings.TEMPLATES[0]["OPTIONS"]["string_if_invalid"].fail = False
else:
dj_settings.TEMPLATE_STRING_IF_INVALID.fail = False


@pytest.fixture(autouse=True, scope="function")
Expand Down

0 comments on commit 2e564f5

Please sign in to comment.