#NEWLINE# def __init__( self , test_case , cell_name , db_entries ) : #NEWLINE# #INDENT# self . test_case = test_case #NEWLINE# self . cell_name = cell_name #NEWLINE# self . db_entries = db_entries #NEWLINE# def fake_base_init( _self , * args , **kwargs ) : #NEWLINE# #INDENT# _self . db = FakeDBApi ( db_entries ) #NEWLINE# #UNINDENT# @ staticmethod #NEWLINE# def _fake_compute_node_get_all( context ) : #NEWLINE# #INDENT# return [ ] #NEWLINE# #UNINDENT# @ staticmethod #NEWLINE# def _fake_service_get_by_binary( context , binary ) : #NEWLINE# #INDENT# return [ ] #NEWLINE# #UNINDENT# test_case . stubs . Set ( base . Base , '__init__' , fake_base_init ) #NEWLINE# test_case . stubs . Set ( objects . ComputeNodeList , 'get_all' , _fake_compute_node_get_all ) #NEWLINE# test_case . stubs . Set ( objects . ServiceList , 'get_by_binary' , _fake_service_get_by_binary ) #NEWLINE# self . cells_manager = FakeCellsManager ( ) #NEWLINE# msg_runner = self . cells_manager . msg_runner #NEWLINE# msg_runner . our_name = self . cell_name #NEWLINE# self . cells_manager . state_manager . my_cell_state . name = self . cell_name