Skip to content

Instantly share code, notes, and snippets.

@cstrap
Created April 28, 2015 10:01
Show Gist options
  • Select an option

  • Save cstrap/f737d2ac042e2ceadfc6 to your computer and use it in GitHub Desktop.

Select an option

Save cstrap/f737d2ac042e2ceadfc6 to your computer and use it in GitHub Desktop.
class MyForm(forms.Form):
some_field = forms.CharField()
class MyWizard(SessionWizardView):
# ...do some stuff...
# And a url like:
url(r'^wizard/$', views.MyWizard.as_view([MyForm, MyOtherForm]))
# Then your test needs to look like:
class TestWizardView(TestCase):
def test_form(self):
data = {'my_wizard-current_step': '0', '0-some_field': 'whatever'}
response = self.client.post('/wizard/', data=data)
# your assertions here
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment