21.05版关键字修改
This commit is contained in:
@@ -284,15 +284,10 @@ AppIdTreeSearch
|
||||
Should Be Equal As Strings ${rescode} 200
|
||||
[Return] ${response['data']}
|
||||
|
||||
|
||||
AddCategories
|
||||
[Arguments] ${returnData} ${categoryList}
|
||||
[Documentation] 新增策略对象
|
||||
... objectList,策略对象,可为list类型与dict类型
|
||||
... addItemList自动过滤itemId
|
||||
... updateItemList自动过滤isInitialize(update时该字段引发异常)
|
||||
... ipItem格式为dict,自动过滤空的字段
|
||||
... stringItem格式为dict,需要注意keywordArray字段应传入逗号分隔的字符串eg: keyword1,keyword2
|
||||
... http_signature为代表的拓展关键字keywordArray字段也是以逗号分隔的
|
||||
[Arguments] ${returnData} ${categoryList} ${opAction} ${testCode}=null
|
||||
[Documentation] 新增Category
|
||||
... returnData,是否返回数据,固定为1
|
||||
Comment 此处思路给category单独的另一套关键字,原因:地址与json串名称与Object部分不同了
|
||||
${returnData}= Run Keyword If '${returnData}' == '${EMPTY}' Set Variable 1
|
||||
@@ -300,20 +295,37 @@ AddCategories
|
||||
#必选参数判定
|
||||
Should Not Be Empty ${categoryList}
|
||||
${dictType} = Evaluate type(${categoryList})
|
||||
${body} Run Keyword If "${dictType}" == "<class 'list'>" CategoryListOperation ${returnData} ${categoryList} add
|
||||
... ELSE IF "${dictType}" == "<class 'dict'>" CategoryOperation ${returnData} ${categoryList} add
|
||||
${body} Run Keyword If "${dictType}" == "<class 'list'>" CategoryListOperation ${returnData} ${categoryList} ${opAction}
|
||||
... ELSE IF "${dictType}" == "<class 'dict'>" CategoryOperation ${returnData} ${categoryList} ${opAction}
|
||||
... ELSE Set Variable ${EMPTY}
|
||||
|
||||
log ${body}
|
||||
# ${response} BasePostRequestForV2 ${categoryUrl} ${body} ${version}
|
||||
${response} Run Keyword If "${opAction}"=="add" BasePostRequestForV2 ${categoryUrl} ${body} ${version}
|
||||
... ELSE IF "${opAction}"=="update" BaseEditRequestForV2 ${categoryUrl} ${body} ${version}
|
||||
${CategoryObjIds} Run Keyword If "${returnData}" == "1" and ${testCode} == 200 and "${opAction}"=="add" Get-CategoryObjIds ${response}
|
||||
... ELSE Set Variable ${EMPTY}
|
||||
${CategoryIds} Run Keyword If "${returnData}" == "1" and ${testCode} == 200 and "${opAction}"=="add" Get-CategoryIds ${response}
|
||||
... ELSE Set Variable ${EMPTY}
|
||||
${response} BasePostRequestForV2 ${categoryUrl} ${body} ${version}
|
||||
${CategoryIds} Run Keyword If "${returnData}" == "1" Get-CategoryIds ${response}
|
||||
... ELSE Create List
|
||||
${rescode} Set Variable ${response['code']}
|
||||
Should Be Equal As Strings ${rescode} 200
|
||||
[Return] ${rescode} ${CategoryIds}
|
||||
Should Be Equal As Strings ${rescode} ${testCode}
|
||||
[Return] ${rescode} ${CategoryObjIds} ${CategoryIds}
|
||||
|
||||
|
||||
|
||||
QueryUpadateRecord
|
||||
[Arguments] ${body} ${code}
|
||||
${response} BaseGetRequestOK /${version}/system/feature/update body=${body}
|
||||
log ${response}
|
||||
${rescode} Set Variable ${response['code']}
|
||||
Shoule Be Equal As Strings ${rescode} ${code}
|
||||
Should Be Equal As Strings ${rescode} ${code}
|
||||
[Return] ${rescode}
|
||||
|
||||
QueryCategory
|
||||
#hbn
|
||||
[Arguments] ${body} ${code}
|
||||
${response} BaseGetRequest /${version}/category/dict body=${body}
|
||||
log ${response}
|
||||
${rescode} Set Variable ${response['code']}
|
||||
Should Be Equal As Strings ${rescode} ${code}
|
||||
# [Return] ${rescode} ${response}
|
||||
|
||||
Reference in New Issue
Block a user