From b893b460fbd9530c9c7e55aa45da62b8ca50424b Mon Sep 17 00:00:00 2001 From: Paul Brand Date: Mon, 28 Oct 2024 08:34:52 +0100 Subject: [PATCH] Renames keyword --- atests/test_requests.robot | 8 ++++---- src/RequestsLibrary/RequestsKeywords.py | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) 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 4217cd0..c74bf83 100644 --- a/src/RequestsLibrary/RequestsKeywords.py +++ b/src/RequestsLibrary/RequestsKeywords.py @@ -168,8 +168,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. """