

def test_form_instance(self):
    request = get_request()
    the_instance = User()
    testform = TestWizard.as_view([('start', UserForm), ('step2', Step2)], instance_dict={
        'start': the_instance,
    })
    (response, instance) = testform(request)
    self.assertEqual(instance.get_form_instance('start'), the_instance)
    self.assertEqual(instance.get_form_instance('non_exist_instance'), None)

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