You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
47 lines
2.6 KiB
47 lines
2.6 KiB
*** Settings ***
|
|
Library DatabaseLibrary
|
|
Library RequestsLibrary
|
|
Library Collections
|
|
Library urllib3
|
|
|
|
*** Test Cases ***
|
|
supplierfocus_save_paper_category
|
|
Disable Warnings
|
|
Create Session yytclient ${yytclient} headers=${cloudfactory_supplierfocus_header}
|
|
${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")}
|
|
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
|
|
Disable Warnings
|
|
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 Global Variable ${paper_category_status}
|
|
|
|
supplierfocus_edit_paper_category
|
|
Disable Warnings
|
|
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
|
|
Disable Warnings
|
|
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"]}
|