Ticket #14576: 14576-regression-test.py

File 14576-regression-test.py, 1.1 KB (added by Timothée Peignier, 14 years ago)

Regression test as a patch

Line 
1Index: django/contrib/formtools/tests/__init__.py
2===================================================================
3--- django/contrib/formtools/tests/__init__.py (revision 14393)
4+++ django/contrib/formtools/tests/__init__.py (working copy)
5@@ -359,4 +359,26 @@
6 "hash_0": "7e9cea465f6a10a6fb47fcea65cb9a76350c9a5c",
7 "wizard_step": "1"}
8 wizard(DummyRequest(POST=data))
9+
10+ def test_14291(self):
11+ """
12+ Regression test for ticket #14291.
13+ """
14+ reached = [False]
15+ that = self
16
17+ class WizardWithProcessStep(WizardClass):
18+ def done(self, request, form_list):
19+ reached[0] = True
20+ that.assertTrue(len(form_list) == 2)
21+
22+ wizard = WizardWithProcessStep([WizardPageOneForm,
23+ WizardPageTwoForm])
24+
25+ data = {"0-field": "test",
26+ "1-field": "test2",
27+ "hash_0": "2fdbefd4c0cad51509478fbacddf8b13",
28+ "wizard_step": "1"}
29+ wizard(DummyRequest(POST=data))
30+ self.assertTrue(reached[0])
31+
Back to Top