Commit 409a4220 authored by Benoit Orihuela's avatar Benoit Orihuela
Browse files

chore: cleanup checks methods

parent ff9a5888
Loading
Loading
Loading
Loading
+4 −2
Original line number Original line Diff line number Diff line
@@ -26,8 +26,10 @@ ${invalid_fragment_filename}= invalid-fragment.jsonld
    ...    ${invalid_fragment_filename}
    ...    ${invalid_fragment_filename}
    ...    ${CONTENT_TYPE_LD_JSON}
    ...    ${CONTENT_TYPE_LD_JSON}
    Check Response Status Code    ${status_code}    ${response.status_code}
    Check Response Status Code    ${status_code}    ${response.status_code}
    Check Response Body Type When Using Session Request    ${response.json()}    ${ERROR_TYPE_INVALID_REQUEST}
    Check Response Body Containing ProblemDetails Element Containing Type Element set to
    Check Response Body Title When Using Session Request    ${response.json()}
    ...    ${response.json()}
    ...    ${ERROR_TYPE_INVALID_REQUEST}
    Check Response Body Containing ProblemDetails Element Containing Title Element    ${response.json()}




*** Keywords ***
*** Keywords ***
+4 −2
Original line number Original line Diff line number Diff line
@@ -29,8 +29,10 @@ Update entity attributes with invalid entity fragments
    ...    ${fragment_filename}
    ...    ${fragment_filename}
    ...    ${CONTENT_TYPE_LD_JSON}
    ...    ${CONTENT_TYPE_LD_JSON}
    Check Response Status Code    400    ${response.status_code}
    Check Response Status Code    400    ${response.status_code}
    Check Response Body Type When Using Session Request    ${response.json()}    ${ERROR_TYPE_INVALID_REQUEST}
    Check Response Body Containing ProblemDetails Element Containing Type Element set to
    Check Response Body Title When Using Session Request    ${response.json()}
    ...    ${response.json()}
    ...    ${ERROR_TYPE_INVALID_REQUEST}
    Check Response Body Containing ProblemDetails Element Containing Title Element    ${response.json()}
    [Teardown]    Delete Entity by Id    ${entity_id}
    [Teardown]    Delete Entity by Id    ${entity_id}


Initialize Environment
Initialize Environment
+4 −2
Original line number Original line Diff line number Diff line
@@ -28,5 +28,7 @@ Create Temporal Entity From File
    ...    ${filename}
    ...    ${filename}
    ...    ${CONTENT_TYPE_LD_JSON}
    ...    ${CONTENT_TYPE_LD_JSON}
    Check Response Status Code    400    ${response.status_code}
    Check Response Status Code    400    ${response.status_code}
    Check Response Body Type When Using Session Request    ${response.json()}    ${ERROR_TYPE_INVALID_REQUEST}
    Check Response Body Containing ProblemDetails Element Containing Type Element set to
    Check Response Body Title When Using Session Request    ${response.json()}
    ...    ${response.json()}
    ...    ${ERROR_TYPE_INVALID_REQUEST}
    Check Response Body Containing ProblemDetails Element Containing Title Element    ${response.json()}
+4 −2
Original line number Original line Diff line number Diff line
@@ -34,8 +34,10 @@ Add an Attribute To a Temporal Entity From File
    ...    ${update_filename}
    ...    ${update_filename}
    ...    ${CONTENT_TYPE_LD_JSON}
    ...    ${CONTENT_TYPE_LD_JSON}
    Check Response Status Code    ${status_code}    ${response.status_code}
    Check Response Status Code    ${status_code}    ${response.status_code}
    Check Response Body Type When Using Session Request    ${response.json()}    ${ERROR_TYPE_INVALID_REQUEST}
    Check Response Body Containing ProblemDetails Element Containing Type Element set to
    Check Response Body Title When Using Session Request    ${response.json()}
    ...    ${response.json()}
    ...    ${ERROR_TYPE_INVALID_REQUEST}
    Check Response Body Containing ProblemDetails Element Containing Title Element    ${response.json()}


Initialize Test Case
Initialize Test Case
    ${temporal_entity_representation_id}=    Generate Random Vehicle Entity Id
    ${temporal_entity_representation_id}=    Generate Random Vehicle Entity Id
+4 −2
Original line number Original line Diff line number Diff line
@@ -19,5 +19,7 @@ ${registration_payload_file_path}= csourceRegistrations/context-source-regi
    ${response}=    Create Context Source Registration
    ${response}=    Create Context Source Registration
    ...    ${csr_payload}
    ...    ${csr_payload}
    Check Response Status Code    400    ${response.status_code}
    Check Response Status Code    400    ${response.status_code}
    Check Response Body Type When Using Session Request    ${response.json()}    ${ERROR_TYPE_BAD_REQUEST_DATA}
    Check Response Body Containing ProblemDetails Element Containing Type Element set to
    Check Response Body Title When Using Session Request    ${response.json()}
    ...    ${response.json()}
    ...    ${ERROR_TYPE_BAD_REQUEST_DATA}
    Check Response Body Containing ProblemDetails Element Containing Title Element    ${response.json()}
Loading