Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add test coverage for done method of OrganizeFormWizard in organize/views.py #664

Open
amakarudze opened this issue Sep 8, 2021 · 3 comments

Comments

@amakarudze
Copy link
Contributor

We are always experiencing server errors in the event application process which require manual troubleshooting because the done method lacks test coverage. The code for submitting the form, which is in the done method of OrganizeFormWizard in organize/views.py, lacks coverage.

Tests need to be written for this method.

@marksweb
Copy link
Collaborator

I'm not entirely sure how you test done() of a WizardView class, because that method doesn't have a URL to test.

@amakarudze
Copy link
Contributor Author

Hey @marksweb, so the method is called by this url in organize/urls.py after all the form steps have been successful. It's using django-formtools. I was able to test most of the form steps using post requests but wasn't sure about hitting the database bit which is handled in the done() method. Maybe @carltongibson can help us with ideas for this test.

@marksweb
Copy link
Collaborator

I saw via sentry that done appears to be exposed in the urls as a step in the wizard.
It expects a list of validated forms, so there may be a way of calling that, but I don't think it'll take the usual get/post requests from the client.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants