diff options
| author | Luke Plant <L.Plant.98@cantab.net> | 2011-01-13 23:25:23 +0000 |
|---|---|---|
| committer | Luke Plant <L.Plant.98@cantab.net> | 2011-01-13 23:25:23 +0000 |
| commit | 0ebb02e9dc2ea9906e2db36dc3f7d998231d462f (patch) | |
| tree | 6c857e08aa7fe40b6cb47c77521b3be24bd46372 | |
| parent | 444bda0be0926b0a9c1bdd03a8adb3a24a4be43a (diff) | |
[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
| -rw-r--r-- | django/contrib/formtools/tests.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/django/contrib/formtools/tests.py b/django/contrib/formtools/tests.py index 264c732598..de71fe5443 100644 --- a/django/contrib/formtools/tests.py +++ b/django/contrib/formtools/tests.py @@ -247,6 +247,7 @@ class WizardTests(TestCase): Regression test for ticket #15075. Allow modifying wizard's form_list in process_step. """ + reached = [False] that = self class WizardWithProcessStep(WizardClass): @@ -255,6 +256,7 @@ class WizardTests(TestCase): self.form_list[1] = WizardPageTwoAlternativeForm if step == 1: that.assertTrue(isinstance(form, WizardPageTwoAlternativeForm)) + reached[0] = True wizard = WizardWithProcessStep([WizardPageOneForm, WizardPageTwoForm, @@ -264,3 +266,4 @@ class WizardTests(TestCase): "hash_0": "2fdbefd4c0cad51509478fbacddf8b13", "wizard_step": "1"} wizard(DummyRequest(POST=data)) + self.assertTrue(reached[0]) |
