#NEWLINE# def test_modelform( self ) : #NEWLINE# #INDENT# r = self . client . get ( reverse ( 'captcha-test-model-form' ) ) #NEWLINE# self . assertEqual ( r . status_code , 200 ) #NEWLINE# ( hash_ , response ) = self . __extract_hash_and_response ( r ) #NEWLINE# r = self . client . post ( reverse ( 'captcha-test-model-form' ) , dict ( captcha_0 = hash_ , captcha_1 = response , subject = 'xxx' , sender = 'asasd@asdasd.com' ) ) #NEWLINE# self . assertEqual ( r . status_code , 200 ) #NEWLINE# self . assertTrue ( ( str ( r . content ) . find ( 'Form validated' ) > 0 ) ) #NEWLINE# r = self . client . post ( reverse ( 'captcha-test-model-form' ) , dict ( captcha_0 = hash_ , captcha_1 = response , subject = 'xxx' , sender = 'asasd@asdasd.com' ) ) #NEWLINE# self . assertEqual ( r . status_code , 200 ) #NEWLINE# self . assertFalse ( ( str ( r . content ) . find ( 'Form validated' ) > 0 ) )