Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Removed unneeded deprecation warning silencing in test suite.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@17940 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 8aca3d1cc295c89ab852f71ecfeac562d4f192ea 1 parent a6b2a15
@claudep claudep authored
View
8 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)
View
10 tests/regressiontests/templates/tests.py
@@ -13,7 +13,6 @@
import os
import sys
import traceback
-import warnings
from urlparse import urljoin
from django import template
@@ -22,8 +21,8 @@
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 @@ def __str__(self):
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 @@ def setUp(self):
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()
Please sign in to comment.
Something went wrong with that request. Please try again.