diff --git a/atests/test_requests.robot b/atests/test_requests.robot index c7703a9..c4baa0a 100644 --- a/atests/test_requests.robot +++ b/atests/test_requests.robot @@ -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} diff --git a/src/RequestsLibrary/RequestsKeywords.py b/src/RequestsLibrary/RequestsKeywords.py index 8fe30ee..224b636 100644 --- a/src/RequestsLibrary/RequestsKeywords.py +++ b/src/RequestsLibrary/RequestsKeywords.py @@ -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. """