Ticket #6812: tests.diff

File tests.diff, 880 bytes (added by james, 7 years ago)
  • django/contrib/formtools/tests.py

     
    2323class PreviewTests(TestCase):
    2424
    2525    def setUp(self):
     26        self._old_root_urlconf = settings.ROOT_URLCONF
    2627        settings.ROOT_URLCONF = 'django.contrib.formtools.test_urls'
    2728        # Create a FormPreview instance to share between tests
    2829        self.preview = preview.FormPreview(TestForm)
    2930        input_template = '<input type="hidden" name="%s" value="%s" />'
    3031        self.input = input_template % (self.preview.unused_name('stage'), "%d")
    3132
     33    def tearDown(self):
     34        settings.ROOT_URLCONF = self._old_root_urlconf
     35
    3236    def test_unused_name(self):
    3337        """
    3438        Verifies name mangling to get uniue field name.
Back to Top