Removed unneeded deprecation warning silencing in test suite.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17940 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
a6b2a15348
commit
8aca3d1cc2
|
@ -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)
|
||||
|
|
|
@ -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()
|
||||
|
|
Loading…
Reference in New Issue