#NEWLINE# def _setup_attrs( self , up = True ) : #NEWLINE# #INDENT# mid_cell = 'child-cell2' #NEWLINE# if up : #NEWLINE# #INDENT# src_cell = 'grandchild-cell1' #NEWLINE# tgt_cell = 'api-cell' #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# src_cell = 'api-cell' #NEWLINE# tgt_cell = 'grandchild-cell1' #NEWLINE# #UNINDENT# self . src_msg_runner = fakes . get_message_runner ( src_cell ) #NEWLINE# methods_cls = self . src_msg_runner . methods_by_type [ 'broadcast' ] #NEWLINE# self . src_methods_cls = methods_cls #NEWLINE# self . src_db_inst = methods_cls . db #NEWLINE# self . src_compute_api = methods_cls . compute_api #NEWLINE# self . src_ca_rpcapi = methods_cls . consoleauth_rpcapi #NEWLINE# if ( not up ) : #NEWLINE# #INDENT# state_manager = self . src_msg_runner . state_manager #NEWLINE# for cell in state_manager . get_child_cells ( ) : #NEWLINE# #INDENT# if ( cell . name != 'child-cell2' ) : #NEWLINE# #INDENT# del state_manager . child_cells [ cell . name ] #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# self . mid_msg_runner = fakes . get_message_runner ( mid_cell ) #NEWLINE# methods_cls = self . mid_msg_runner . methods_by_type [ 'broadcast' ] #NEWLINE# self . mid_methods_cls = methods_cls #NEWLINE# self . mid_db_inst = methods_cls . db #NEWLINE# self . mid_compute_api = methods_cls . compute_api #NEWLINE# self . mid_ca_rpcapi = methods_cls . consoleauth_rpcapi #NEWLINE# self . tgt_msg_runner = fakes . get_message_runner ( tgt_cell ) #NEWLINE# methods_cls = self . tgt_msg_runner . methods_by_type [ 'broadcast' ] #NEWLINE# self . tgt_methods_cls = methods_cls #NEWLINE# self . tgt_db_inst = methods_cls . db #NEWLINE# self . tgt_compute_api = methods_cls . compute_api #NEWLINE# self . tgt_ca_rpcapi = methods_cls . consoleauth_rpcapi