Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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 Morales authored July 08, 2011
9  tests/regressiontests/i18n/patterns/tests.py
... ...
@@ -1,6 +1,7 @@
1 1
 from __future__ import with_statement
2 2
 
3 3
 import os
  4
+import warnings
4 5
 
5 6
 from django.core.exceptions import ImproperlyConfigured
6 7
 from django.core.urlresolvers import reverse, clear_url_caches
@@ -248,6 +249,14 @@ class URLTagTests(URLTestCaseBase):
248 249
     """
249 250
     Test if the language tag works.
250 251
     """
  252
+    def setUp(self):
  253
+        self.save_warnings_state()
  254
+        warnings.filterwarnings('ignore', category=DeprecationWarning,
  255
+                                module='django.template.defaulttags')
  256
+
  257
+    def tearDown(self):
  258
+        self.restore_warnings_state()
  259
+
251 260
     def test_strings_only(self):
252 261
         t = Template("""{% load i18n %}
253 262
             {% language 'nl' %}{% url no-prefix-translated %}{% endlanguage %}

0 notes on commit 68d18b8

Please sign in to comment.
Something went wrong with that request. Please try again.