#NEWLINE# def _stub_instance_get( self , uuid = None ) : #NEWLINE# #INDENT# if ( uuid is None ) : #NEWLINE# #INDENT# uuid = uuidutils . generate_uuid ( ) #NEWLINE# #UNINDENT# instance = fake_instance . fake_instance_obj ( self . context , id = 1 , uuid = uuid , vm_state = vm_states . ACTIVE , task_state = None , launched_at = timeutils . utcnow ( ) ) #NEWLINE# self . compute_api . get ( self . context , uuid , expected_attrs = None , want_objects = True ) . AndReturn ( instance ) #NEWLINE# return instance