*** Settings *** Documentation 设置成有效已登记病人接口 Library Collections Library HttpLibrary.HTTP Library RequestsLibrary *** Variables *** ${uri} /IPatientService ${method} SetValidPatient *** Test Cases *** *** Keywords *** setValidPatient_Post [Arguments] ${token} ${newPatientCode} ${oldPatientCode} ${params} Create List ${param} Create Dictionary Set To Dictionary ${param} Token ${token} Set To Dictionary ${param} NewPatientCode ${newPatientCode} Set To Dictionary ${param} OldPatientCode ${oldPatientCode} Append To List ${params} ${param} ${data} common_data ${method} ${params} Log ${data} Log ---开始断言验证--- ${response} request_post ${URL} ${uri} ${data} Log ${response} log ${response.content} ${content} Set Variable ${response.content} Log ---输出返回内容---: Log Json ${content} INFO Log ---开始断言验证--- Should Be True ${response.status_code}==200 [Return] ${response} setValidPatient_assertClassTrue [Arguments] ${token} ${newPatientCode} ${oldPatientCode} ${content} setValidPatient_Post ${token} ${newPatientCode} ${oldPatientCode} ${result} Get From Dictionary ${content.json()} result Log ${result} Should Be True ${result} [Return] ${content} setValidPatient_assertException [Arguments] ${token} ${newPatientCode} ${oldPatientCode} ${error_code} ${error_msg} ${content} setValidPatient_Post ${token} ${newPatientCode} ${oldPatientCode} ${error} Get From Dictionary ${content.json()} error ${code} Get From Dictionary ${error} code ${message} Get From Dictionary ${error} message Should Be Equal As Numbers ${code} ${error_code} Should Be String ${message} ${error_msg} [Return] ${content}