chore: always use arguments when using function

  • always use arguments when using function when checking response or request (body, headers and status_code)
  • remove Set Test Variable and Set Suite Variable in ApiUtils.ressource (only use Return)

Merge request reports

Loading
+4 −4
Changes for TP/NGSI-LD/CommonBehaviours/044_02.robot: 4 added lines, 4 removed lines.
Original line number Diff line number Diff line
@@ -32,7 +32,7 @@ ${content_type}= application/json
    Check Response Status Code    201    ${response.status_code}
    ${response}=    Query Entity    ${id}    context=${ngsild_test_suite_context}    accept=*/*
    Check Response Status Code    200    ${response.status_code}
    Check Response Headers Containing Content-Type set to    ${response.headers}    ${content_type}
    Check Response Headers Containing Content-Type set to    ${content_type}    ${response.headers}
    Check Response Headers Link Not Empty    ${response.headers}
    [Teardown]    Delete Entity by Id Returning Response    ${id}

@@ -44,7 +44,7 @@ ${content_type}= application/json
    Check Response Status Code    201    ${response.status_code}
    ${response}=    Retrieve Subscription    ${id}    accept=*/*
    Check Response Status Code    200    ${response.status_code}
    Check Response Headers Containing Content-Type set to    ${response.headers}    ${content_type}
    Check Response Headers Containing Content-Type set to    ${content_type}    ${response.headers}
    Check Response Headers Link Not Empty    ${response.headers}
    [Teardown]    Delete Subscription    ${id}

@@ -62,7 +62,7 @@ ${content_type}= application/json
    ...    context=${ngsild_test_suite_context}
    ...    accept=*/*
    Check Response Status Code    200    ${response.status_code}
    Check Response Headers Containing Content-Type set to    ${response.headers}    ${content_type}
    Check Response Headers Containing Content-Type set to    ${content_type}    ${response.headers}
    Check Response Headers Link Not Empty    ${response.headers}
    [Teardown]    Delete Context Source Registration    ${registration_id}

@@ -83,6 +83,6 @@ ${content_type}= application/json
    ...    accept=*/*
    Check Response Status Code    200    ${response.status_code}
    Set Test Variable    ${response}
    Check Response Headers Containing Content-Type set to    ${response.headers}    ${content_type}
    Check Response Headers Containing Content-Type set to    ${content_type}    ${response.headers}
    Check Response Headers Link Not Empty    ${response.headers}
    [Teardown]    Delete Temporal Representation Of Entity    ${temporal_entity_representation_id}
+0 −1
Changes for TP/NGSI-LD/ContextInformation/Consumption/Discovery/RetrieveAvailableAttributeInformation/027_01_01.robot: 0 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -26,7 +26,6 @@ Retrieve Detailed Representation Of Available Attribute Without Context
    Check Response Body Containing ProblemDetails Element Containing Title Element    ${response.json()}



*** Keywords ***
Setup Initial Entities
    ${entity_id}=    Generate Random Entity Id    ${building_id_prefix}
+1 −1
Changes for TP/NGSI-LD/ContextInformation/Consumption/Discovery/RetrieveAvailableAttributeInformation/027_01_02.robot: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -21,7 +21,7 @@ Retrieve Detailed Representation Of Available Attribute
    [Tags]    ed-attr    5_7_10
    ${response}=    Retrieve Attribute    attribute_name=airQualityLevel    context=${ngsild_test_suite_context}
    Check Response Status Code    200    ${response.status_code}
    Check Response Body Containing Attribute element    ${expectation_file}
    Check Response Body Containing Attribute element    ${expectation_file}    ${response.json()}


*** Keywords ***
+1 −1
Changes for TP/NGSI-LD/ContextInformation/Consumption/Discovery/RetrieveAvailableAttributes/025_01.robot: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -29,7 +29,7 @@ Retrieve Available Attributes
    [Arguments]    ${context}    ${expectation_file}
    ${response}=    Retrieve Attributes    ${context}
    Check Response Status Code    200    ${response.status_code}
    Check Response Body Containing AttributeList element    ${expectation_file}
    Check Response Body Containing AttributeList element    ${expectation_file}    ${response.json()}

Setup Initial Entities
    ${entity_id}=    Generate Random Entity Id    ${building_id_prefix}
+0 −1
Changes for TP/NGSI-LD/ContextInformation/Consumption/Discovery/RetrieveAvailableEntityTypeInformation/024_01_01.robot: 0 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -26,7 +26,6 @@ Retrieve Detailed Representation Of Available Entity Type Without Context
    Check Response Body Containing ProblemDetails Element Containing Title Element    ${response.json()}



*** Keywords ***
Setup Initial Entities
    ${first_entity_id}=    Generate Random Entity Id    ${building_id_prefix}
Loading
Loading