#NEWLINE# def test_grandchild_targeted_message_with_error( self ) : #NEWLINE# #INDENT# target_cell = 'api-cell!child-cell2!grandchild-cell1' #NEWLINE# method = 'our_fake_method' #NEWLINE# method_kwargs = dict ( arg1 = 1 , arg2 = 2 ) #NEWLINE# direction = 'down' #NEWLINE# def our_fake_method( message , **kwargs ) : #NEWLINE# #INDENT# raise test . TestingException ( 'this should be returned' ) #NEWLINE# #UNINDENT# fakes . stub_tgt_method ( self , 'grandchild-cell1' , 'our_fake_method' , our_fake_method ) #NEWLINE# tgt_message = messaging . _TargetedMessage ( self . msg_runner , direction . ctxt , method , method_kwargs , direction , target_cell , need_response = True ) #NEWLINE# response = tgt_message . process ( ) #NEWLINE# self . assertTrue ( response . failure ) #NEWLINE# self . assertRaises ( test . TestingException , response . value_or_raise )