def testFiles(self): """ This method tests the buisness login (and dao ) for the insertFiles() API """ bo = DBSFile(self.logger, self.dbi, self.owner) binput = [{ 'adler32': u'NOTSET', 'file_type': 'EDM', 'file_output_config_list': [{ 'release_version': 'CMSSW_1_2_3', 'pset_hash': '76e303993a1c2f842159dbfeeed9a0dd', 'app_name': 'cmsRun', 'output_module_label': 'Merged' }], 'dataset': '/unittest_web_primary_ds_name_684/unittest_web_dataset_684/GEN-SIM-RAW', 'file_size': u'2012211901', 'auto_cross_section': 0.0, 'check_sum': u'1504266448', 'file_lumi_list': [{ 'lumi_section_num': u'27414', 'run_num': u'1' }, { 'lumi_section_num': u'26422', 'run_num': u'1' }, { 'lumi_section_num': u'29838', 'run_num': u'1' }], 'file_parent_list': [], 'event_count': u'1619', 'logical_file_name': '/store/mc/parent_684/0.root', 'block': '/unittest_web_primary_ds_name_684/unittest_web_dataset_684/GEN-SIM-RAW#684', 'creation_date': 1234, 'create_by': 'anzar', "last_modification_date": 1234, "last_modified_by": "anzar", }] bo.insertFile(binput)
def test04(self): """DBSFile.insertFile""" from dbs.business.DBSFile import DBSFile bo = DBSFile(self.logger, self.dbi) binput = [] for k in range(100): file = { "logicalfilename": "/store/but_file_%s_%s.root" % (IC, str(k)), "isfilevalid": True, "dataset": "/BUT_%s/BUT_PROCESSED_DATASET_V%s/GEN-SIM-RECO" % (IC, IC), "block": "/BUT_%s/BUT_PROCESSED_DATASET_V%s/GEN-SIM-RECO#BUT_BLOCK_%s" % (IC, IC, IC), "filetype": "EDM", "checksum": "999", "eventcount": 1000, "filesize": 1024, "branchhash": "TEST", "adler32": "adler32", "md5": "md5", "autocrosssection": 12345., "creationdate": 1234, "createby": "*****@*****.**", "lastmodificationdate": 12345, "lastmodifiedby": "*****@*****.**" } binput.append(file) bo.insertFile(binput)
def testFiles(self): """ This method tests the buisness login (and dao ) for the insertFiles() API """ bo = DBSFile(self.logger, self.dbi, self.owner) binput = [ {'adler32': u'NOTSET', 'file_type': 'EDM', 'file_output_config_list': [{'release_version': 'CMSSW_1_2_3', 'pset_hash': '76e303993a1c2f842159dbfeeed9a0dd', 'app_name': 'cmsRun', 'output_module_label': 'Merged'}], 'dataset': '/unittest_web_primary_ds_name_684/unittest_web_dataset_684/GEN-SIM-RAW', 'file_size': u'2012211901', 'auto_cross_section': 0.0, 'check_sum': u'1504266448', 'file_lumi_list': [{'lumi_section_num': u'27414', 'run_num': u'1'}, {'lumi_section_num': u'26422', 'run_num': u'1'}, {'lumi_section_num': u'29838', 'run_num': u'1'}], 'file_parent_list': [], 'event_count': u'1619', 'logical_file_name': '/store/mc/parent_684/0.root', 'block': '/unittest_web_primary_ds_name_684/unittest_web_dataset_684/GEN-SIM-RAW#684', 'creation_date' : 1234, 'create_by' : 'anzar', "last_modification_date" : 1234, "last_modified_by" : "anzar", } ] bo.insertFile(binput)
def test04(self): """DBSFile.insertFile""" from dbs.business.DBSFile import DBSFile bo = DBSFile(self.logger, self.dbi) binput = [] for k in range(100): file = {"logicalfilename":"/store/but_file_%s_%s.root" % (IC, str(k)), "isfilevalid":True, "dataset":"/BUT_%s/BUT_PROCESSED_DATASET_V%s/GEN-SIM-RECO" % (IC, IC), "block":"/BUT_%s/BUT_PROCESSED_DATASET_V%s/GEN-SIM-RECO#BUT_BLOCK_%s" % (IC, IC, IC), "filetype":"EDM", "checksum":"999", "eventcount":1000, "filesize":1024, "branchhash":"TEST", "adler32":"adler32", "md5":"md5", "autocrosssection":12345., "creationdate":1234, "createby":"*****@*****.**", "lastmodificationdate":12345, "lastmodifiedby":"*****@*****.**"} binput.append(file) bo.insertFile(binput)