#NEWLINE# def test_form_submit_bad_hash( self ) : #NEWLINE# #INDENT# '\n        Test contrib.formtools.preview form submittal does not proceed\n        if the hash is incorrect.\n        ' #NEWLINE# self . test_data . update ( { #NEWLINE# #INDENT# 'stage' : 2 , #NEWLINE# #UNINDENT# } ) #NEWLINE# response = self . client . post ( '/preview/' , self . test_data ) #NEWLINE# self . assertEqual ( response . status_code , 200 ) #NEWLINE# self . assertNotEqual ( response . content , success_string ) #NEWLINE# hash = ( utils . form_hmac ( TestForm ( self . test_data ) ) + 'bad' ) #NEWLINE# self . test_data . update ( { #NEWLINE# #INDENT# 'hash' : hash , #NEWLINE# #UNINDENT# } ) #NEWLINE# response = self . client . post ( '/previewpreview/' , response . test_data ) #NEWLINE# self . assertNotEqual ( response . content , success_string )