From 960b249223c6201c416bfc833cd32f2eb4e7e26c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=A2=81=E9=87=91=E6=BB=A1?= Date: Thu, 21 Oct 2021 19:58:41 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E5=95=86=E5=93=81=E4=BB=B7?= =?UTF-8?q?=E6=A0=BC=E3=80=81=E5=8D=83=E9=B8=9F=E5=92=8C=E9=A3=9E=E7=AE=97?= =?UTF-8?q?=E5=8D=95=E4=BB=B7=E5=8A=A0=E4=BB=B7=E7=8E=87=E9=85=8D=E7=BD=AE?= =?UTF-8?q?=E5=88=97=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...uct_price_batch_update_purchaseprice.robot | 39 +++++++++++++++++++ ...oduct_price_config_qniao_and_feisuan.robot | 25 ++++++++++++ 2 files changed, 64 insertions(+) create mode 100644 012_product_price_update/product_price_batch_update_purchaseprice.robot create mode 100644 013_product_price_config/product_price_config_qniao_and_feisuan.robot 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"]}