diff --git a/012_product_price_update/product_price_batch_update_purchaseprice.robot b/012_product_price_update/product_price_batch_update_purchaseprice.robot new file mode 100644 index 0000000..7b152a8 --- /dev/null +++ b/012_product_price_update/product_price_batch_update_purchaseprice.robot @@ -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"]} diff --git a/013_product_price_config/product_price_config_qniao_and_feisuan.robot b/013_product_price_config/product_price_config_qniao_and_feisuan.robot new file mode 100644 index 0000000..a5dd839 --- /dev/null +++ b/013_product_price_config/product_price_config_qniao_and_feisuan.robot @@ -0,0 +1,25 @@ +*** 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_config_qniao_and_feisuan_list + Create Session yytclient ${yytclient} headers=${cloudfactory_supplierfocus_header} + ${response} Get On Session yytclient /cloud-print-user-center/get/settlement-interval/two-dimension/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_config_qniao_and_feisuan_update_log_list + Create Session yytclient ${yytclient} headers=${cloudfactory_supplierfocus_header} + ${response} Get On Session yytclient /cloud-print-user-center/get/paper/premium-rate/history/page + 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"]}