#NEWLINE# def test_add_experiment_instance_id( self ) : #NEWLINE# #INDENT# session = self . session_maker ( ) #NEWLINE# try : #NEWLINE# #INDENT# resource_types = session . query ( CoordinatorModel . ResourceType ) . all ( ) #NEWLINE# self . assertEquals ( 0 , len ( resource_types ) , 'No resource expected in the beginning of the test' ) #NEWLINE# exp_id = ExperimentInstanceId ( 'exp1' , 'ud-pld' , 'PLD Experiments' ) #NEWLINE# session . commit ( ) #NEWLINE# #UNINDENT# finally : #NEWLINE# #INDENT# session . close ( ) #NEWLINE# #UNINDENT# self . resources_manager . add_experiment_instance_id ( 'laboratory1:WL_SERVER1@WL_MACHINE1' , exp_id , Resource ( 'type' , 'instance' ) ) #NEWLINE# session = self . session_maker ( ) #NEWLINE# try : #NEWLINE# #INDENT# self . _check_resource_added ( session ) #NEWLINE# self . _check_experiment_instance_id_added ( exp_id ) #NEWLINE# session . commit ( ) #NEWLINE# #UNINDENT# finally : #NEWLINE# #INDENT# session . close ( )