def test_detect_graph_process_pooling(self):
     with open(os.path.join(
             test_utils.JSON_DATA_DIR, 'MTBLS1', 'MTBLS1.json')) as \
             isajson_fp:
         ISA = isajson.load(isajson_fp)
         for study in ISA.studies:
             utils.detect_graph_process_pooling(study.graph)
             for assay in study.assays:
                 pooling_list = utils.detect_graph_process_pooling(
                     assay.graph)
                 self.assertListEqual(
                     sorted(pooling_list),
                     sorted(['#process/Extraction1', '#process/NMR_assay1']))
 def test_detect_graph_process_pooling_batch_on_mtbls(self):
     for i in range(1, 1):
         try:
             J = MTBLS.getj('MTBLS{}'.format(i))
             ISA = isajson.load(StringIO(json.dumps(J)))
             for study in ISA.studies:
                 utils.detect_graph_process_pooling(study.graph)
                 for assay in study.assays:
                     utils.detect_graph_process_pooling(assay.graph)
         except IOError:
             log.error('IO Error, skipping...')
         except KeyError:
             log.error('KeyError, skipping...')
         except AttributeError:
             log.error('AttributeError, skipping...')
         except ValidationError:
             log.error('jsonschema ValidationError, skipping...')