#5441: Add unit tests for django.contrib.formtools
------------------------+---------------------------------------------------
Reporter: adrian | Owner: simeon
Status: assigned | Component: django.contrib.formtools
Version: SVN | Resolution:
Keywords: | Stage: Accepted
Has_patch: 1 | Needs_docs: 0
Needs_tests: 0 | Needs_better_patch: 0
------------------------+---------------------------------------------------
Changes (by simeon):
* owner: nobody => simeon
* status: new => assigned
* has_patch: 0 => 1
* needs_tests: 1 => 0
Comment:
I've attached three files:
* models.py - this is empty but running `runtests.py formtools` generated
an import error as the test runner attempts to import models for modules
with tests.
* test_urls.py - this contains urlpattern to map a url to the generated
form to be tested. Couldn't think of any other way to do this.
* tests.py - Uses the test Client object to test the form. Currently
there are only 4 tests which verify a form is generated, verify the
preview stage, and verify that the form's done() method is fired if the
preview is accepted.
I'm not very experienced with python, UnitTest, or Django yet, so I'll be
happy to revise if anyone has comments or requests.
--
Ticket URL: <http://code.djangoproject.com/ticket/5441#comment:7>
Django Code <http://code.djangoproject.com/>
The web framework for perfectionists with deadlines
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---