Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

FIlter warnings about deprecated syntax of the `url` template tag in …

…recently added tests.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@16524 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 68d18b8492c52e138994c62cc3336986a2002859 1 parent ce89ebe
@ramiro ramiro authored
Showing with 9 additions and 0 deletions.
  1. +9 −0 tests/regressiontests/i18n/patterns/tests.py
View
9 tests/regressiontests/i18n/patterns/tests.py
@@ -1,6 +1,7 @@
from __future__ import with_statement
import os
+import warnings
from django.core.exceptions import ImproperlyConfigured
from django.core.urlresolvers import reverse, clear_url_caches
@@ -248,6 +249,14 @@ class URLTagTests(URLTestCaseBase):
"""
Test if the language tag works.
"""
+ def setUp(self):
+ self.save_warnings_state()
+ warnings.filterwarnings('ignore', category=DeprecationWarning,
+ module='django.template.defaulttags')
+
+ def tearDown(self):
+ self.restore_warnings_state()
+
def test_strings_only(self):
t = Template("""{% load i18n %}
{% language 'nl' %}{% url no-prefix-translated %}{% endlanguage %}
Please sign in to comment.
Something went wrong with that request. Please try again.