*** Settings *** Library DatabaseLibrary Library RequestsLibrary Library Collections Library urllib3 *** Test Cases *** supplierfocus_save_paper_category Create Session yytclient ${yytclient} headers=${cloudfactory_supplierfocus_header} ${paper_category_name} Set Variable autotest_paper_category_name ${body} Set Variable {"name":"${paper_category_name}"} Set Suite Variable ${paper_category_name} ${response} POST On Session yytclient /trading-center/save/product/paper-category ${body.encode("utf8")} Set Global Variable ${paper_category_name} log ${response.json()} Should Be Equal As Numbers 200 ${response.status_code} Should Be Equal As Strings successful ${response.json()["message"]} supplierfocus_get_paper_category_list Create Session yytclient ${yytclient} headers=${cloudfactory_supplierfocus_header} ${response} Get On Session yytclient /trading-center/get/product/paper-category-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_category_name} ${response.json()["data"]["records"][0]["name"]} ${paper_category_id} Get From Dictionary ${response.json()["data"]["records"][0]} id Set Global Variable ${paper_category_id} ${paper_category_status} Get From Dictionary ${response.json()["data"]["records"][0]} status Set Suite Variable ${paper_category_status} supplierfocus_edit_paper_category Create Session yytclient ${yytclient} headers=${cloudfactory_supplierfocus_header} ${body} Set Variable {"name":"${paper_category_name}","id":"${paper_category_id}","status":${paper_category_status}} ${response} POST On Session yytclient /trading-center/save/product/paper-category ${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_disable_paper_category Create Session yytclient ${yytclient} headers=${cloudfactory_supplierfocus_header} ${body} Set Variable {"name":"${paper_category_name}","id":"${paper_category_id}","status":1} ${response} POST On Session yytclient /trading-center/save/product/paper-category ${body.encode("utf8")} log ${response.json()} Should Be Equal As Numbers 200 ${response.status_code} Should Be Equal As Strings successful ${response.json()["message"]}