*** Settings *** Documentation 获取有效相同病人名称的列表 Suite Setup get_login_token ${URL} jo22 Library Collections Library HttpLibrary.HTTP Library RequestsLibrary *** Variables *** ${uri} /IPatientService ${method} FindValidPatientsByName *** Test Cases *** Class_001_获取有效相同病人名称的列表 [Tags] inexecution [Template] findValidPatientsByName_assertClass ${token} 12 *** Keywords *** findValidPatientsByName_Post [Arguments] ${token} ${name} ${param} Create Dictionary Set To Dictionary ${param} Token ${token} Set To Dictionary ${param} Name ${name} ${data} body_data_list ${method} ${param} Log ${data} Log ---开始断言验证--- ${response} request_post ${URL} ${uri} ${data} ${content} check_response ${response} Log ${content} [Return] ${response} findValidPatientsByName_assertClass [Arguments] ${token} ${name} ${content} findValidPatientsByName_Post ${token} ${name} ${result} Get From Dictionary ${content.json()} result Log ${result}[0] ${result1} Set Variable ${result}[0] ${PatientDataList} Set Variable ${result1}[PatientData] Log ${PatientDataList} ${Patient} Set Variable ${PatientDataList}[0] Should Not Be Empty ${result} Should Be Equal As Strings ${Patient}[Value] ${name} [Return] ${content} findValidPatientsByName_assertClassNull [Arguments] ${token} ${name} ${content} findPatientByCode_Post ${token} ${code} ${result} Get From Dictionary ${content.json()} result should be empty ${result} [Return] ${content} findValidPatientsByName_assertException [Arguments] ${token} ${name} ${error_code} ${error_msg} ${content} findPatientByCode_Post ${token} ${code} ${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}