云印通原纸商城
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.
 
 

38 lines
2.0 KiB

*** Settings ***
Library RequestsLibrary
Library Collections
Library urllib3
*** Variables ***
&{operationpsc_header} Content-Type=application/json;charset=UTF-8 X-APP-ID=503258978847965324 Authorization=${gettoken_operate_psc}
${pscops} https://api-ops-psc-test.qniao.cn
${yytops} https://api-ops-yyt-test.qniao.cn
*** Test Cases ***
operate_get_receivable_list
Create Session yytops ${yytops} headers=${operationpsc_header}
${response} Get On Session yytops /trading-center/admin/get/receivable-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"]}
operate_get_receivable_list_search
Create Session yytops ${yytops} headers=${operationpsc_header}
${param} Set Variable enterpriseName=${printing_packaging_factory_name}
${response} Get On Session yytops /trading-center/admin/get/receivable-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"]}
${receivable_id} Get From Dictionary ${response.json()["data"]["records"][0]} id
Set Suite Variable ${receivable_id}
operate_confirm_receivable
Create Session yytops ${yytops} headers=${operationpsc_header}
${receivable_remark} Set Variable autotest_remark
${bady} Set Variable {"id":"${receivable_id}","realAmount":${customer_order_totalPrice},"remark":"${receivable_remark}"}
${response} POST On Session yytops /trading-center/admin/confirm/receivable ${bady}
log ${response.json()}
Should Be Equal As Numbers 200 ${response.status_code}
Should Be Equal As Strings successful ${response.json()["message"]}