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.
31 lines
1.7 KiB
31 lines
1.7 KiB
*** Settings ***
|
|
Test Teardown Run Keyword If Test Failed Fatal Error
|
|
Library RequestsLibrary
|
|
Library Collections
|
|
Library urllib3
|
|
|
|
*** Test Cases ***
|
|
operate_psc_mail
|
|
Disable Warnings
|
|
Create Session pscops ${pscops} headers=${operation_psc_header}
|
|
#${username_operatepsc} Set Variable liangjinman@qniao.cn
|
|
#${password_operatepsc} Set Variable qn123456
|
|
&{body} Create Dictionary username=${username_operatepsc} password=${password_operatepsc}
|
|
${response} POST On Session pscops /payment-settlement-center/admin/login ${body}
|
|
Log ${response.json()}
|
|
Should Be Equal As Numbers 200 ${response.status_code}
|
|
Should Be Equal As Strings 登陆成功 ${response.json()["message"]}
|
|
${getlogintoken_operatepsc} get from Dictionary ${response.headers} Authorization
|
|
Set Global Variable ${getlogintoken_operatepsc}
|
|
&{operationpsc_header} Create Dictionary Content-Type=application/json;charset=UTF-8 X-APP-ID=503258978847965324 Authorization=${getlogintoken_operatepsc}
|
|
Set Global Variable ${operationpsc_header}
|
|
|
|
get_operate_userinfo
|
|
Disable Warnings
|
|
Create Session pscops ${pscops} headers=${operationpsc_header}
|
|
${response} Get On Session pscops /payment-settlement-center/admin/employee/get/login-info
|
|
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"]}
|