

def test_persistence(self):
    testform = TestWizard.as_view([('start', Step1), ('step2', Step2)])
    request = get_request({
        'test_wizard-current_step': 'start',
        'name': 'data1',
    })
    (response, instance) = testform(request)
    self.assertEqual(instance.steps.current, 'start')
    instance.storage.current_step = 'step2'
    testform2 = TestWizard.as_view([('start', Step1), ('step2', Step2)])
    request.POST = {
        'test_wizard-current_step': 'step2',
    }
    (response, instance) = testform2(request)
    self.assertEqual(instance.steps.current, 'step2')

dataset/ETHPy150Open AppScale/appscale/AppServer/lib/django-1.4/django/contrib/formtools/tests/wizard/forms.py FormTests.test_persistence/original