Removed some more imports/warnings useless after recent removals.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@17850 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Claude Paroz 2012-03-31 15:20:57 +00:00
parent d2e273e295
commit 6d9227bb0f
2 changed files with 0 additions and 12 deletions

View File

@ -7,7 +7,6 @@ from django.conf import settings
from django.contrib.formtools import preview, utils from django.contrib.formtools import preview, utils
from django.contrib.formtools.wizard import FormWizard from django.contrib.formtools.wizard import FormWizard
from django.test import TestCase from django.test import TestCase
from django.test.utils import get_warnings_state, restore_warnings_state
from django.utils import unittest from django.utils import unittest
from django.contrib.formtools.tests.wizard import * from django.contrib.formtools.tests.wizard import *
@ -47,20 +46,12 @@ class PreviewTests(FormToolsTestCase):
def setUp(self): def setUp(self):
super(PreviewTests, self).setUp() super(PreviewTests, self).setUp()
self.save_warnings_state()
warnings.filterwarnings('ignore', category=DeprecationWarning,
module='django.contrib.formtools.utils')
# Create a FormPreview instance to share between tests # Create a FormPreview instance to share between tests
self.preview = preview.FormPreview(TestForm) self.preview = preview.FormPreview(TestForm)
input_template = '<input type="hidden" name="%s" value="%s" />' input_template = '<input type="hidden" name="%s" value="%s" />'
self.input = input_template % (self.preview.unused_name('stage'), "%d") self.input = input_template % (self.preview.unused_name('stage'), "%d")
self.test_data = {'field1':u'foo', 'field1_':u'asdf'} self.test_data = {'field1':u'foo', 'field1_':u'asdf'}
def tearDown(self):
super(PreviewTests, self).tearDown()
self.restore_warnings_state()
def test_unused_name(self): def test_unused_name(self):
""" """
Verifies name mangling to get uniue field name. Verifies name mangling to get uniue field name.

View File

@ -3,9 +3,7 @@ Tests for django test runner
""" """
from __future__ import absolute_import from __future__ import absolute_import
import StringIO
from optparse import make_option from optparse import make_option
import warnings
from django.core.exceptions import ImproperlyConfigured from django.core.exceptions import ImproperlyConfigured
from django.core.management import call_command from django.core.management import call_command
@ -13,7 +11,6 @@ from django import db
from django.test import simple from django.test import simple
from django.test.simple import DjangoTestSuiteRunner, get_tests from django.test.simple import DjangoTestSuiteRunner, get_tests
from django.test.testcases import connections_support_transactions from django.test.testcases import connections_support_transactions
from django.test.utils import get_warnings_state, restore_warnings_state
from django.utils import unittest from django.utils import unittest
from django.utils.importlib import import_module from django.utils.importlib import import_module