Skip to content

Commit

Permalink
Renames keyword
Browse files Browse the repository at this point in the history
  • Loading branch information
PaulBrandUWV committed Oct 28, 2024
1 parent ea3cd17 commit 629bc19
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions atests/test_requests.robot
Original file line number Diff line number Diff line change
Expand Up @@ -283,20 +283,20 @@ Trace Request
${resp}= TRACE ${HTTP_LOCAL_SERVER}/anything
Status Should Be OK ${resp}

Get request with get response
Get request with last response
[Tags] get
GET ${HTTP_LOCAL_SERVER}/anything
Status Should Be OK
${resp}= Get response
${resp}= Last response
Should be equal ${resp.status_code} ${200}
Should be equal ${resp.json()}[url] ${HTTP_LOCAL_SERVER}/anything

Post request with get response
Post request with last response
[Tags] post
${data}= Create dictionary key1=one key2=two key3=3
POST ${HTTP_LOCAL_SERVER}/anything json=${data}
Status Should Be OK
${resp}= Get response
${resp}= Last response
Should be equal ${resp.status_code} ${200}
Should be equal ${resp.json()}[url] ${HTTP_LOCAL_SERVER}/anything
Should be equal ${resp.json()}[json] ${data}
4 changes: 2 additions & 2 deletions src/RequestsLibrary/RequestsKeywords.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,8 +152,8 @@ def get_file_for_streaming_upload(path):
"""
return open(path, "rb")

@keyword("Get response")
def get_response(self) -> requests.Response:
@keyword("Last response")
def get_last_response(self) -> requests.Response:
"""
Returns the response from the last request.
"""
Expand Down

0 comments on commit 629bc19

Please sign in to comment.