|
|
|
@ -0,0 +1,39 @@ |
|
|
|
*** Settings *** |
|
|
|
Library RequestsLibrary |
|
|
|
Library Collections |
|
|
|
Library urllib3 |
|
|
|
|
|
|
|
*** Variables *** |
|
|
|
&{cloudfactory_supplierfocus_header} Content-Type=application/json;charset=UTF-8 X-APP-ID=503258978847956666 Authorization=${getlogintoken_supplier_focus} |
|
|
|
${yytclient} https://api-client-yyt-test.qniao.cn |
|
|
|
|
|
|
|
*** Test Cases *** |
|
|
|
product_price_sku_list |
|
|
|
Create Session yytclient ${yytclient} headers=${cloudfactory_supplierfocus_header} |
|
|
|
${response} Get On Session yytclient /trading-center/get/seller/product-sku-list |
|
|
|
Log ${response.status_code} |
|
|
|
log ${response.json()} |
|
|
|
Should Be Equal As Numbers 200 ${response.status_code} |
|
|
|
Should Be Equal As Strings successful ${response.json()["message"]} |
|
|
|
|
|
|
|
product_price_sku_list_search |
|
|
|
Create Session yytclient ${yytclient} headers=${cloudfactory_supplierfocus_header} |
|
|
|
${param} Set Variable salesEnterpriseId=${supplier_paper_id}&name=${paper_name} |
|
|
|
${response} Get On Session yytclient /trading-center/get/seller/product-sku-list params=${param} |
|
|
|
Log ${response.status_code} |
|
|
|
log ${response.json()} |
|
|
|
Should Be Equal As Numbers 200 ${response.status_code} |
|
|
|
Should Be Equal As Strings successful ${response.json()["message"]} |
|
|
|
${product_price_sku_id} Get From Dictionary ${response.json()["data"]["records"][0]} skuId |
|
|
|
Set Global Variable ${product_price_sku_id} |
|
|
|
|
|
|
|
product_price_sku_batch_update_purchaseprice |
|
|
|
Create Session yytclient ${yytclient} headers=${cloudfactory_supplierfocus_header} |
|
|
|
${product_price_sku_alterType} Set Variable 1 #变更类型 1统一修改 2增加价格 3减少价格 |
|
|
|
${product_status} Set Variable {"skuids":["${product_price_sku_id}"],"alterType":${product_price_sku_alterType},"price":6789} |
|
|
|
${body} Set Variable {"status":${product_status},"id":"${product_id}"} |
|
|
|
${response} POST On Session yytclient /trading-center/product/unify/alter/purchasing-cost ${body.encode("utf8")} |
|
|
|
Log ${response.status_code} |
|
|
|
log ${response.json()} |
|
|
|
Should Be Equal As Numbers 200 ${response.status_code} |
|
|
|
Should Be Equal As Strings successful ${response.json()["message"]} |