Anonymous avatar Anonymous committed cafac29

Removed unneeded deprecation warning silencing in test suite.

Comments (0)

Files changed (2)


 class FieldsTests(SimpleTestCase):
-    def setUp(self):
-        self.save_warnings_state()
-        warnings.filterwarnings('ignore', category=DeprecationWarning,
-                                module='django.core.validators')
-    def tearDown(self):
-        self.restore_warnings_state()
     def test_field_sets_widget_is_required(self):


 import os
 import sys
 import traceback
-import warnings
 from urlparse import urljoin
 from django import template
 from django.template import loader
 from django.template.loaders import app_directories, filesystem, cached
 from django.test import RequestFactory
-from django.test.utils import (get_warnings_state, restore_warnings_state,
-    setup_test_template_loader, restore_template_loaders, override_settings)
+from django.test.utils import (setup_test_template_loader,
+    restore_template_loaders, override_settings)
 from django.utils import unittest
 from django.utils.formats import date_format
 from django.utils.translation import activate, deactivate, ugettext as _
 class Templates(unittest.TestCase):
     def setUp(self):
-        self._warnings_state = get_warnings_state()
-        warnings.filterwarnings('ignore', category=DeprecationWarning,
-                                module='django.template.defaulttags')
         self.old_static_url = settings.STATIC_URL
         self.old_media_url = settings.MEDIA_URL
         settings.STATIC_URL = u"/static/"
     def tearDown(self):
         settings.STATIC_URL = self.old_static_url
         settings.MEDIA_URL = self.old_media_url
-        restore_warnings_state(self._warnings_state)
     def test_loaders_security(self):
         ad_loader = app_directories.Loader()
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.