def get_data(self, dataid, type, parms): if type == 'json': title, rowdata = getRowData(dataid, parms['PATH']) res = generate_json_data(title, rowdata) logger.info(u"依据索引[{0}]获取测试数据为:{1},数据源为:{2}".format( dataid, res, parms['PATH'])) return res elif type == 'list': title, rowdata = getRowData(dataid, parms['PATH']) res = generate_data(title, rowdata) logger.info(u"依据索引[{0}]获取测试数据为:{1},数据源为:{2}".format( dataid, res, parms['PATH'])) return res
def _excel_list(self, str_data): title, rowdata = getRowData(str_data, self.basedata["db_excel_path"]) res = generate_data(title, rowdata) self.logger.debug(u"依据索引[{0}]获取测试数据为:{1},数据源为:{2}".format( str_data, res, self.basedata["db_excel_path"])) return res