summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRussell Keith-Magee <russell@keith-magee.com>2008-06-19 13:32:39 +0000
committerRussell Keith-Magee <russell@keith-magee.com>2008-06-19 13:32:39 +0000
commite726065d5d19bab23078c416513bc8cf9f40d20b (patch)
treedccc8b486989f432f1fbafda88b1a84118f91abb
parent090aeee39979c279564c4673a1af2a6b15ce001e (diff)
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
-rw-r--r--django/contrib/formtools/tests.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/django/contrib/formtools/tests.py b/django/contrib/formtools/tests.py
index feda6e041e..143857ad58 100644
--- a/django/contrib/formtools/tests.py
+++ b/django/contrib/formtools/tests.py
@@ -23,12 +23,16 @@ class TestForm(forms.Form):
class PreviewTests(TestCase):
def setUp(self):
+ self._old_root_urlconf = settings.ROOT_URLCONF
settings.ROOT_URLCONF = 'django.contrib.formtools.test_urls'
# Create a FormPreview instance to share between tests
self.preview = preview.FormPreview(TestForm)
input_template = '<input type="hidden" name="%s" value="%s" />'
self.input = input_template % (self.preview.unused_name('stage'), "%d")
+ def tearDown(self):
+ settings.ROOT_URLCONF = self._old_root_urlconf
+
def test_unused_name(self):
"""
Verifies name mangling to get uniue field name.