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

36 lines
1.9 KiB

*** Settings ***
Library RequestsLibrary
Library Collections
Library urllib3
*** Variables ***
&{operation_psc_header} Content-Type=application/x-www-form-urlencoded X-APP-ID=503258978847965324
${pscops} https://api-ops-psc-test.qniao.cn
*** Test Cases ***
operate_mail
Disable Warnings
Create Session pscops ${pscops} headers=${operation_psc_header}
${username} Set Variable liangjinman@qniao.cn
${password} Set Variable qn123456
&{body} Create Dictionary username=${username} password=${password}
${response} POST On Session pscops /payment-settlement-center/admin/login ${body}
Log ${response.status_code}
Log ${response.json()}
Should Be Equal As Numbers 200 ${response.status_code}
Should Be Equal As Strings 登陆成功 ${response.json()["message"]}
${gettoken_operate_psc} get from Dictionary ${response.headers} Authorization
log ${gettoken_operate_psc}
Set Global Variable ${gettoken_operate_psc}
&{operationpsc_header} Create Dictionary Content-Type=application/json;charset=UTF-8 X-APP-ID=503258978847965324 Authorization=${gettoken_operate_psc}
Set Suite Variable ${operationpsc_header}
get_operate_userinfo
Create Session pscops ${pscops} headers=${operationpsc_header}
${response} Get On Session pscops /payment-settlement-center/admin/employee/get/login-info
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"]}
Should Be Equal As Strings 498985714734731264 ${response.json()["data"]["adminId"]}
Should Be Equal As Strings 管理员 ${response.json()["data"]["positionList"][0]["name"]}