Fixed #22130 -- Deprecated fix_ampersands, removed utils.clean_html()

This commit is contained in:
Erik Romijn 2014-03-01 10:42:08 +01:00
parent 8c98f39624
commit 775975f15d
7 changed files with 64 additions and 24 deletions

View file

@ -607,7 +607,10 @@ class TemplateTests(TestCase):
failures.append("Template test (Cached='%s', TEMPLATE_STRING_IF_INVALID='%s', TEMPLATE_DEBUG=%s): %s -- FAILED. Template loading invoked method that shouldn't have been invoked." % (is_cached, invalid_str, template_debug, name))
try:
output = self.render(test_template, vals)
with warnings.catch_warnings():
# Ignore deprecation of fix_ampersands
warnings.filterwarnings("ignore", category=DeprecationWarning, module='django.template.defaultfilters')
output = self.render(test_template, vals)
except ShouldNotExecuteException:
failures.append("Template test (Cached='%s', TEMPLATE_STRING_IF_INVALID='%s', TEMPLATE_DEBUG=%s): %s -- FAILED. Template rendering invoked method that shouldn't have been invoked." % (is_cached, invalid_str, template_debug, name))
except ContextStackException: