Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fixed #6812 -- Modified the formtools test case to be run order safe …

…with respect to the ROOT_URLCONF setting. Thanks for the patch, james

git-svn-id: http://code.djangoproject.com/svn/django/trunk@7705 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit e726065d5d19bab23078c416513bc8cf9f40d20b 1 parent 090aeee
Russell Keith-Magee authored June 19, 2008

Showing 1 changed file with 4 additions and 0 deletions. Show diff stats Hide diff stats

  1. 4  django/contrib/formtools/tests.py
4  django/contrib/formtools/tests.py
@@ -23,12 +23,16 @@ class TestForm(forms.Form):
23 23
 class PreviewTests(TestCase):
24 24
 
25 25
     def setUp(self):
  26
+        self._old_root_urlconf = settings.ROOT_URLCONF
26 27
         settings.ROOT_URLCONF = 'django.contrib.formtools.test_urls'
27 28
         # Create a FormPreview instance to share between tests
28 29
         self.preview = preview.FormPreview(TestForm)
29 30
         input_template = '<input type="hidden" name="%s" value="%s" />'
30 31
         self.input = input_template % (self.preview.unused_name('stage'), "%d")
31 32
 
  33
+    def tearDown(self):
  34
+        settings.ROOT_URLCONF = self._old_root_urlconf
  35
+        
32 36
     def test_unused_name(self):
33 37
         """
34 38
         Verifies name mangling to get uniue field name.

0 notes on commit e726065

Please sign in to comment.
Something went wrong with that request. Please try again.