0426 日志查询封装公共部分

This commit is contained in:
unknown
2020-04-26 18:53:34 +08:00
parent edf709ae45
commit 9d70215314
3 changed files with 139 additions and 11 deletions

View File

@@ -1,7 +1,7 @@
*** Settings ***
Library Collections
Library RequestsLibrary
Resource ../../03-Variable/BifangApiVariable.txt
Library Collections
Library RequestsLibrary
Resource ../../03-Variable/BifangApiVariable.txt
*** Keywords ***
Post-Request
@@ -21,30 +21,30 @@ Get-Request
${response} to json ${remoteResponse.content}
Should Be Equal As Strings ${remoteResponse.status_code} 200
[Return] ${response}
Delete-Request
[Arguments] ${url} ${data}
${header} Create Dictionary Content-Type=application/json Authorization=${token}
Create Session api http://${host}:${port}/${version} headers=${header}
${remoteResponse} Delete Request api ${url} data=${data} headers=${header}
${remoteResponse} Delete Request api ${url} data=${data} headers=${header}
${response} to json ${remoteResponse.content}
Should Be Equal As Strings ${remoteResponse.status_code} 200
[Return] ${response}
UpFilePostRequest
[Arguments] ${url} ${data} ${files} ${fileDesc}
${header} Set To Dictionary ${fileDesc} Authorization=${token}
Create Session api http://${host}:${port}/${version} headers=${header}
${remoteResponse} Post Request api ${url} data=${data} files=${files} headers=${header}
${remoteResponse} Post Request api ${url} data=${data} files=${files} headers=${header}
${response} to json ${remoteResponse.content}
Should Be Equal As Strings ${remoteResponse.status_code} 200
[Return] ${response}
UpFilePutRequest
[Arguments] ${url} ${data} ${files} ${fileDesc}
${header} Set To Dictionary ${fileDesc} Authorization=${token}
${header} Set To Dictionary ${fileDesc} Authorization=${token}
Create Session api http://${host}:${port}/${version} headers=${header}
${remoteResponse} Put Request api ${url} params=${data} files=${files} headers=${header}
${remoteResponse} Put Request api ${url} params=${data} files=${files} headers=${header}
${response} to json ${remoteResponse.content}
Should Be Equal As Strings ${remoteResponse.status_code} 200
[Return] ${response}
[Return] ${response}