From 8aca3d1cc295c89ab852f71ecfeac562d4f192ea Mon Sep 17 00:00:00 2001 From: Claude Paroz Date: Thu, 26 Apr 2012 18:06:17 +0000 Subject: [PATCH] Removed unneeded deprecation warning silencing in test suite. git-svn-id: http://code.djangoproject.com/svn/django/trunk@17940 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- tests/regressiontests/forms/tests/fields.py | 8 -------- tests/regressiontests/templates/tests.py | 10 ++-------- 2 files changed, 2 insertions(+), 16 deletions(-) diff --git a/tests/regressiontests/forms/tests/fields.py b/tests/regressiontests/forms/tests/fields.py index a941cd36af..4e7b013199 100644 --- a/tests/regressiontests/forms/tests/fields.py +++ b/tests/regressiontests/forms/tests/fields.py @@ -48,14 +48,6 @@ def fix_os_paths(x): 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): self.assertTrue(Field(required=True).widget.is_required) self.assertFalse(Field(required=False).widget.is_required) diff --git a/tests/regressiontests/templates/tests.py b/tests/regressiontests/templates/tests.py index 34c8d7aa85..9b6f8d40a4 100644 --- a/tests/regressiontests/templates/tests.py +++ b/tests/regressiontests/templates/tests.py @@ -13,7 +13,6 @@ import time import os import sys import traceback -import warnings from urlparse import urljoin from django import template @@ -22,8 +21,8 @@ from django.core import urlresolvers 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 _ @@ -152,10 +151,6 @@ class UTF8Class: 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/" @@ -164,7 +159,6 @@ class Templates(unittest.TestCase): 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()