def testProcessed(self):
        print "testProcessed"
        procSrcList = self.srcApi.listProcessedDatasets(patternPrim=self.primName, patternProc=self.procName)
        procDstList = self.dstApi.listProcessedDatasets(patternPrim=self.primName, patternProc=self.procName)
        valid.assertProc(self, procSrcList[0], procDstList[0])
        for i in range(len(procSrcList[0]["AlgoList"])):
            valid.assertAlgo(self, procSrcList[0]["AlgoList"][i], procDstList[0]["AlgoList"][i])

        parentSrcList = self.srcApi.listDatasetParents(self.path)
        parentDstList = self.dstApi.listDatasetParents(self.path)
        parentSrcList.sort(key=lambda obj: obj["Name"])
        parentDstList.sort(key=lambda obj: obj["Name"])
        for i in range(len(parentSrcList)):
            self.assertEqual(parentSrcList[i]["PrimaryDataset"]["Name"], parentDstList[i]["PrimaryDataset"]["Name"])
            self.assertEqual(parentSrcList[i]["Name"], parentDstList[i]["Name"])
	def testProcessed(self):
		print 'testProcessed'
		procSrcList = srcApi.listProcessedDatasets(patternPrim = primName, patternProc = procName)
		procDstList = dstApi.listProcessedDatasets(patternPrim = primName, patternProc = procName, patternDT=pathTokens[3])
		#print processedInDBS
		print '\n\n\nprocSrcList',procSrcList
		print '\n\n\nprocDstList',procDstList
		valid.assertProc(self, procSrcList[0], procDstList[0])
		for i in range(len(procSrcList[0]['AlgoList'])):
			valid.assertAlgo(self, procSrcList[0]['AlgoList'][i], procDstList[0]['AlgoList'][i])

			
		parentSrcList = srcApi.listDatasetParents(path)
		parentDstList = dstApi.listDatasetParents(path)
		parentSrcList.sort(key=lambda obj: obj['Name'])
		parentDstList.sort(key=lambda obj: obj['Name'])
		for i in range(len(parentSrcList)):
			self.assertEqual(parentSrcList[i]['PrimaryDataset']['Name'], parentDstList[i]['PrimaryDataset']['Name'])
			self.assertEqual(parentSrcList[i]['Name'], parentDstList[i]['Name'])
Example #3
0
    def testProcessed(self):
        print 'testProcessed'
        procSrcList = self.srcApi.listProcessedDatasets(
            patternPrim=self.primName, patternProc=self.procName)
        procDstList = self.dstApi.listProcessedDatasets(
            patternPrim=self.primName, patternProc=self.procName)
        valid.assertProc(self, procSrcList[0], procDstList[0])
        for i in range(len(procSrcList[0]['AlgoList'])):
            valid.assertAlgo(self, procSrcList[0]['AlgoList'][i],
                             procDstList[0]['AlgoList'][i])

        parentSrcList = self.srcApi.listDatasetParents(self.path)
        parentDstList = self.dstApi.listDatasetParents(self.path)
        parentSrcList.sort(key=lambda obj: obj['Name'])
        parentDstList.sort(key=lambda obj: obj['Name'])
        for i in range(len(parentSrcList)):
            self.assertEqual(parentSrcList[i]['PrimaryDataset']['Name'],
                             parentDstList[i]['PrimaryDataset']['Name'])
            self.assertEqual(parentSrcList[i]['Name'],
                             parentDstList[i]['Name'])
Example #4
0
	def testProcessed(self):
		print 'testProcessed'
		procSrcList = srcApi.listProcessedDatasets(patternPrim = primName, patternProc = procName, patternDT=tierName)
		procDstList = dstApi.listProcessedDatasets(patternPrim = primName, patternProc = procName, patternDT=tierName)
		valid.assertProc(self, procSrcList[0], procDstList[0])

		algoSrcList = procSrcList[0]['AlgoList']
		algoDstList = procDstList[0]['AlgoList']
		algoSrcList.sort(key=lambda obj: obj['ParameterSetID']['Hash'])
		algoDstList.sort(key=lambda obj: obj['ParameterSetID']['Hash'])
		algoSrcList.sort(key=lambda obj: obj['ApplicationFamily'])
		algoDstList.sort(key=lambda obj: obj['ApplicationFamily'])

		for i in range(len(algoSrcList)):
			valid.assertAlgo(self, algoSrcList[i], algoDstList[i])

			
		parentSrcList = srcApi.listDatasetParents(path)
		parentDstList = dstApi.listDatasetParents(path)
		parentSrcList.sort(key=lambda obj: obj['Name'])
		parentDstList.sort(key=lambda obj: obj['Name'])
		for i in range(len(parentSrcList)):
			self.assertEqual(parentSrcList[i]['PrimaryDataset']['Name'], parentDstList[i]['PrimaryDataset']['Name'])
			self.assertEqual(parentSrcList[i]['Name'], parentDstList[i]['Name'])