summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAymeric Augustin <aymeric.augustin@m4x.org>2013-02-24 10:28:05 +0100
committerAymeric Augustin <aymeric.augustin@m4x.org>2013-02-24 10:28:05 +0100
commitc10ed58746d341dc83169018030b8dbe823fc4eb (patch)
treeb5a73ad8d2c9d9e592f1d04ea8507b2e877b4cf6
parent17a28b39a8d77997f83ecd94ebcff7b198b8cb05 (diff)
Caught warnings in the templates tests. Refs #17906.
This was missing from f49e9a517f2fdc1d9ed7ac841ace77636cbd6747.
-rw-r--r--tests/regressiontests/templates/tests.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/regressiontests/templates/tests.py b/tests/regressiontests/templates/tests.py
index 1eca735612..37b57e06a2 100644
--- a/tests/regressiontests/templates/tests.py
+++ b/tests/regressiontests/templates/tests.py
@@ -17,6 +17,7 @@ try:
from urllib.parse import urljoin
except ImportError: # Python 2
from urlparse import urljoin
+import warnings
from django import template
from django.core import urlresolvers
@@ -491,7 +492,10 @@ class Templates(TestCase):
for is_cached in (False, True):
try:
try:
- test_template = loader.get_template(name)
+ with warnings.catch_warnings():
+ # Ignore pending deprecations of the old syntax of the 'cycle' and 'firstof' tags.
+ warnings.filterwarnings("ignore", category=PendingDeprecationWarning, module='django.template.base')
+ test_template = loader.get_template(name)
except ShouldNotExecuteException:
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))