#NEWLINE# def test_filter_with_session_is_active_failure( self ) : #NEWLINE# #INDENT# message = mock . Mock ( spec = suds . sax . element . Element ) #NEWLINE# def child_at_path_mock( path ) : #NEWLINE# #INDENT# if ( path == '/Envelope/Body/SessionIsActive' ) : #NEWLINE# #INDENT# return self . login #NEWLINE# #UNINDENT# #UNINDENT# message . childAtPath . side_effect = child_at_path_mock #NEWLINE# record = mock . Mock ( msg = self ) #NEWLINE# self . assertTrue ( self . log_filter . filter ( record ) ) #NEWLINE# self . assertEqual ( '***' , self . username . getText ( ) ) #NEWLINE# self . assertEqual ( '***' , self . password . getText ( ) ) #NEWLINE# self . assertEqual ( 'bcdef' , self . session_id . getText ( ) )