def check_tasklist_by_name(self, **kargs):
		#report event
		expectStr = ''
		expectCnt = kargs['expectCnt']
		name = kargs['name']
		kargs.pop('expectCnt')
		#get all group by name
		report_res = self.list_tasklist(**kargs)
		group_id_list = utils.getTaskListIDByName(name, report_res)
		
		if len(group_id_list) != int(expectCnt):
			raise Exception('Expect count of group(name=%s) is %s, but actually got %s'%(name, expectCnt, len(group_id_list)))
Esempio n. 2
0
    def check_tasklist_by_name(self, **kargs):
        #report event
        expectStr = ''
        expectCnt = kargs['expectCnt']
        name = kargs['name']
        kargs.pop('expectCnt')
        #get all group by name
        report_res = self.list_tasklist(**kargs)
        group_id_list = utils.getTaskListIDByName(name, report_res)

        if len(group_id_list) != int(expectCnt):
            raise Exception(
                'Expect count of group(name=%s) is %s, but actually got %s' %
                (name, expectCnt, len(group_id_list)))
Esempio n. 3
0
 def get_tasklist_id_by_name(self, **kargs):
     res = self.list_tasklist(**kargs)
     result_list = utils.getTaskListIDByName(kargs['name'], res)
     if len(result_list) == 0:
         raise Exception('Can not find group(name : %s) !' % kargs['name'])
     return result_list[0]
	def get_tasklist_id_by_name(self, **kargs):
		res = self.list_tasklist(**kargs)
		result_list = utils.getTaskListIDByName(kargs['name'], res)
		if len(result_list) == 0:
			raise Exception('Can not find group(name : %s) !'%kargs['name'])
		return result_list[0]