#NEWLINE# def testEndToEndTestFailure( self ) : #NEWLINE# #INDENT# args = endtoend . EndToEndTestFlowArgs ( test_names = [ 'TestFailure' ] ) #NEWLINE# with test_lib . Instrument ( flow . GRRFlow , 'SendReply' ) as send_reply : #NEWLINE# #INDENT# for _ in test_lib . TestFlowHelper ( 'EndToEndTestFlow' , self . client_mock , client_id = self . client_id , token = self . token , args = args ) : #NEWLINE# #INDENT# pass #NEWLINE# #UNINDENT# results = [ ] #NEWLINE# for ( _ , reply ) in self . args : #NEWLINE# #INDENT# if isinstance ( reply , endtoend . EndToEndTestResult ) : #NEWLINE# #INDENT# results . append ( reply ) #NEWLINE# self . assertFalse ( reply . success ) #NEWLINE# self . assertEqual ( reply . test_class_name , 'TestFailure' ) #NEWLINE# self . assertTrue ( ( 'This should be logged' in reply . log ) ) #NEWLINE# #UNINDENT# #UNINDENT# self . assertEqual ( len ( results ) , 1 )