Package django :: Package contrib :: Package formtools :: Module tests :: Class PreviewTests
[hide private]
[frames] | no frames]

Class PreviewTests

source code

test.TestCase --+
                |
               PreviewTests

Instance Methods [hide private]
 
setUp(self) source code
 
test_unused_name(self)
Verifies name mangling to get uniue field name.
source code
 
test_form_get(self)
Test contrib.formtools.preview form retrieval.
source code
 
test_form_preview(self)
Test contrib.formtools.preview form preview rendering.
source code
 
test_form_submit(self)
Test contrib.formtools.preview form submittal.
source code
Method Details [hide private]

test_form_get(self)

source code 

Test contrib.formtools.preview form retrieval.

Use the client library to see if we can sucessfully retrieve the form (mostly testing the setup ROOT_URLCONF process). Verify that an additional hidden input field is created to manage the stage.

test_form_preview(self)

source code 

Test contrib.formtools.preview form preview rendering.

Use the client library to POST to the form to see if a preview is returned. If we do get a form back check that the hidden value is correctly managing the state of the form.

test_form_submit(self)

source code 

Test contrib.formtools.preview form submittal.

Use the client library to POST to the form with stage set to 3 to see if our forms done() method is called. Check first without the security hash, verify failure, retry with security hash and verify sucess.