Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

[1.2.X] Fixed some bugs with formtools tests.

Without these checks, it is possible for the tests to pass by virtue of
asserts never being reached for some reason (very possible in this case, due
to handling of security hashes).

Backport of [15198] from trunk.

git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.2.X@15200 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 0ebb02e9dc2ea9906e2db36dc3f7d998231d462f 1 parent 444bda0
Luke Plant authored January 13, 2011

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

  1. 3  django/contrib/formtools/tests.py
3  django/contrib/formtools/tests.py
@@ -247,6 +247,7 @@ def test_15075(self):
247 247
         Regression test for ticket #15075.  Allow modifying wizard's form_list
248 248
         in process_step.
249 249
         """
  250
+        reached = [False]
250 251
         that = self
251 252
 
252 253
         class WizardWithProcessStep(WizardClass):
@@ -255,6 +256,7 @@ def process_step(self, request, form, step):
255 256
                     self.form_list[1] = WizardPageTwoAlternativeForm
256 257
                 if step == 1:
257 258
                     that.assertTrue(isinstance(form, WizardPageTwoAlternativeForm))
  259
+                    reached[0] = True
258 260
 
259 261
         wizard = WizardWithProcessStep([WizardPageOneForm,
260 262
                                         WizardPageTwoForm,
@@ -264,3 +266,4 @@ def process_step(self, request, form, step):
264 266
                 "hash_0": "2fdbefd4c0cad51509478fbacddf8b13",
265 267
                 "wizard_step": "1"}
266 268
         wizard(DummyRequest(POST=data))
  269
+        self.assertTrue(reached[0])

0 notes on commit 0ebb02e

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