1
0
mirror of https://github.com/django/django.git synced 2025-10-24 06:06:09 +00:00

Deprecated TEMPLATE_STRING_IF_INVALID.

This commit is contained in:
Aymeric Augustin
2014-12-14 23:13:03 +01:00
parent 3dc01aaaaf
commit d3a982556d
9 changed files with 44 additions and 33 deletions

View File

@@ -258,7 +258,13 @@ class TemplateRegressionTests(SimpleTestCase):
with self.assertRaises(urlresolvers.NoReverseMatch):
t.render(c)
@override_settings(TEMPLATE_STRING_IF_INVALID='%s is invalid', SETTINGS_MODULE='also_something')
@override_settings(
TEMPLATES=[{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'OPTIONS': {'string_if_invalid': '%s is invalid'},
}],
SETTINGS_MODULE='also_something',
)
def test_url_reverse_view_name(self):
# Regression test for #19827
t = Template('{% url will_not_match %}')