#NEWLINE# def _check_experiment_instance_id_added( self , session ) : #NEWLINE# #INDENT# experiment_types = session . query ( CoordinatorModel . ExperimentType ) . all ( ) #NEWLINE# self . assertEquals ( 1 , len ( experiment_types ) ) #NEWLINE# experiment_type = experiment_types [ 0 ] #NEWLINE# self . assertEquals ( 'PLD Experiments' , experiment_type . cat_name ) #NEWLINE# self . assertEquals ( 'ud-pld' , experiment_type . exp_name ) #NEWLINE# experiment_instances = experiment_type . instances #NEWLINE# self . assertEquals ( 1 , len ( experiment_instances ) ) #NEWLINE# experiment_instance = experiment_instances [ 0 ] #NEWLINE# self . assertEquals ( 'exp1' , experiment_instance . experiment_instance_id ) #NEWLINE# self . assertEquals ( experiment_type , experiment_instance . experiment_type ) #NEWLINE# resource_instance = experiment_instance . resource_instance #NEWLINE# self . assertEquals ( 'instance' , resource_instance . name ) #NEWLINE# resource_type = resource_instance . resource_type #NEWLINE# self . assertTrue ( ( resource_type in experiment_type . resource_types ) ) #NEWLINE# self . assertTrue ( ( experiment_type in resource_type . experiment_types ) )