*** Settings *** Library RequestsLibrary Library Collections Library urllib3 *** Test Cases *** supplierfocus_save_paper_brand Disable Warnings Create Session yytclient ${yytclient} headers=${cloudfactory_supplierfocus_header} ${body} Set Variable {"categoryId":"${paper_categoryid}","paperManufacturerId":"${paper_Manufacturerid}","name":"${paper_brand_name}","paperName":"${paper_name}","characteristic":"${paper_characteristic}","description":"${paper_description}","img":"${paper_brand_img}"} ${response} POST On Session yytclient /trading-center/save/product/brand ${body.encode("utf8")} log ${response.json()} Should Be Equal As Numbers 200 ${response.status_code} Should Be Equal As Strings successful ${response.json()["message"]} sleep 1 supplierfocus_get_paper_brand_list Disable Warnings Create Session yytclient ${yytclient} headers=${cloudfactory_supplierfocus_header} ${response} Get On Session yytclient /trading-center/get/product/brand-list log ${response.json()} Should Be Equal As Numbers 200 ${response.status_code} Should Be Equal As Strings successful ${response.json()["message"]} Should Be Equal As Strings ${paper_brand_name} ${response.json()["data"]["records"][0]["name"]} Should Be Equal As Strings ${paper_name} ${response.json()["data"]["records"][0]["paperName"]} supplierfocus_search_paper_brand Disable Warnings Create Session yytclient ${yytclient} headers=${cloudfactory_supplierfocus_header} ${param} Set Variable searchValue=${paper_brand_name} ${response} Get On Session yytclient /trading-center/get/product/brand-list params=${param} log ${response.json()} Should Be Equal As Numbers 200 ${response.status_code} Should Be Equal As Strings successful ${response.json()["message"]} Should Be Equal As Strings ${paper_brand_name} ${response.json()["data"]["records"][0]["name"]} Should Be Equal As Strings ${paper_name} ${response.json()["data"]["records"][0]["paperName"]} ${paper_brand_id} Get From Dictionary ${response.json()["data"]["records"][0]} id Set Global Variable ${paper_brand_id} supplierfocus_edit_paper_brand Disable Warnings Create Session yytclient ${yytclient} headers=${cloudfactory_supplierfocus_header} ${body} Set Variable {"id":"${paper_brand_id}","categoryId":"${paper_categoryid}","paperManufacturerId":"${paper_Manufacturerid}","name":"${paper_brand_name}","paperName":"${paper_name}","characteristic":"${paper_characteristic}","description":"${paper_description}","img":"${paper_brand_img}"} ${response} POST On Session yytclient /trading-center/save/product/brand ${body.encode("utf8")} log ${response.json()} Should Be Equal As Numbers 200 ${response.status_code} Should Be Equal As Strings successful ${response.json()["message"]} supplierfocus_update_status_paper_brand Disable Warnings Create Session yytclient ${yytclient} headers=${cloudfactory_supplierfocus_header} ${body} Set Variable {"idList":["${paper_brand_id}"],"status":0} #纸品状态 0上架 1下架 ${response} POST On Session yytclient /trading-center/update/category-brands/status/batch ${body.encode("utf8")} log ${response.json()} Should Be Equal As Numbers 200 ${response.status_code} Should Be Equal As Strings successful ${response.json()["message"]}