*** Settings *** Library DatabaseLibrary Library RequestsLibrary Library Collections Library urllib3 *** Test Cases *** operate_get_noton_sale_product_list Disable Warnings Create Session yytops ${yytops} headers=${operationbackend_header} ${param} Set Variable isOnSale=0 #是否特价 0否 1是 ${response} Get On Session yytops /trading-center/admin/get/on-sale-category-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"]} operate_on_sale_product_list_earch Disable Warnings Create Session yytops ${yytops} headers=${operationbackend_header} ${param} Set Variable isOnSale=0&name=${paper_brand_name}&paperName=${paper_name} ${response} Get On Session yytops /trading-center/admin/get/on-sale-category-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"]} ${on_sale_product_paper_id} Get From Dictionary ${response.json()["data"]["records"][0]} id Set Global Variable ${on_sale_product_paper_id} operate_add_on_sale_product Disable Warnings Create Session yytops ${yytops} headers=${operationbackend_header} ${product_isOnSale} Set Variable 1 #是否特价 0否 1是 ${body} Set Variable {"categoryBrandIds":["${on_sale_product_paper_id}"],"isOnSale":${product_isOnSale}} ${response} POST On Session yytops trading-center/admin/add-or-remove/on-sale-category-brands ${body.encode("utf8")} log ${response.json()} Should Be Equal As Numbers 200 ${response.status_code} Should Be Equal As Strings successful ${response.json()["message"]} operate_get_on_sale_product_list Disable Warnings Create Session yytops ${yytops} headers=${operationbackend_header} ${param} Set Variable isOnSale=1 #是否特价 0否 1是 ${response} Get On Session yytops /trading-center/admin/get/on-sale-category-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 ${on_sale_product_paper_id} ${response.json()["data"]["records"][0]["id"]} customer_get_on_sale_product_list Disable Warnings Create Session yytclient ${yytclient} headers=${cloudfactory_customer_header} ${param} Set Variable isOnSale=1 #是否特价 0否 1是 ${response} Get On Session yytclient /trading-center/wechatapplet/get/paper-brand/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 ${on_sale_product_paper_id} ${response.json()["data"]["records"][0]["id"]} operate_remove_on_sale_product Disable Warnings Create Session yytops ${yytops} headers=${operationbackend_header} ${product_isOnSale} Set Variable 0 #是否特价 0否 1是 ${body} Set Variable {"categoryBrandIds":["${on_sale_product_paper_id}"],"isOnSale":${product_isOnSale}} ${response} POST On Session yytops trading-center/admin/add-or-remove/on-sale-category-brands ${body.encode("utf8")} log ${response.json()} Should Be Equal As Numbers 200 ${response.status_code} Should Be Equal As Strings successful ${response.json()["message"]}