#NEWLINE# def test_form_submit( self ) : #NEWLINE# #INDENT# '\n        Test contrib.formtools.preview form submittal.\n\n        Use the client library to POST to the form with stage set to 3\n        to see if our forms done() method is called. Check first\n        without the security hash, verify failure, retry with security\n        hash and verify sucess.\n\n        ' #NEWLINE# self . test_data . update ( { #NEWLINE# #INDENT# 'stage' : 2 , #NEWLINE# #UNINDENT# } ) #NEWLINE# response = self . client . post ( '/preview/' , self . test_data ) #NEWLINE# self . assertNotEqual ( response . content , success_string ) #NEWLINE# hash = self . preview . security_hash ( None , TestForm ( self . test_data ) ) #NEWLINE# self . test_data . update ( { #NEWLINE# #INDENT# 'hash' : hash , #NEWLINE# #UNINDENT# } ) #NEWLINE# response = self . client . post ( '/preview/' , self . test_data ) #NEWLINE# self . assertEqual ( response . content , success_string )