Commit f4706224 authored by Benoit Orihuela's avatar Benoit Orihuela
Browse files

fix(013_03): delete fixture entity in teardown

parent 49f49973
Loading
Loading
Loading
Loading
+7 −3
Original line number Original line Diff line number Diff line
@@ -3,7 +3,8 @@ Documentation Check that you cannot delete an attribute from an entity with
Resource          ${EXECDIR}/resources/ApiUtils.resource
Resource          ${EXECDIR}/resources/ApiUtils.resource
Resource          ${EXECDIR}/resources/AssertionUtils.resource
Resource          ${EXECDIR}/resources/AssertionUtils.resource
Resource          ${EXECDIR}/resources/JsonUtils.resource
Resource          ${EXECDIR}/resources/JsonUtils.resource
Test Setup        Setup Initial Entities
Suite Setup       Setup Initial Entities
Suite Teardown    Delete Initial Entities
Test Template     Delete Attributes
Test Template     Delete Attributes


*** Variable ***
*** Variable ***
@@ -26,8 +27,6 @@ Delete Attributes
    [Arguments]    ${entity_id}    ${attribute_id}    ${datasetId}
    [Arguments]    ${entity_id}    ${attribute_id}    ${datasetId}
    [Documentation]    Check that you cannot delete an attribute from an entity with invalid/missing ids
    [Documentation]    Check that you cannot delete an attribute from an entity with invalid/missing ids
    [Tags]    ea-delete    5_6_5
    [Tags]    ea-delete    5_6_5
    ${request}    ${response}=    Create Entity Selecting Content Type    ${filename}    ${valid_entity_id}    ${CONTENT_TYPE_LD_JSON}
    Check Response Status Code    201    ${response['status']}
    ${response}=    Delete Entity Attributes    ${entity_id}    ${attribute_id}    ${datasetId}    false
    ${response}=    Delete Entity Attributes    ${entity_id}    ${attribute_id}    ${datasetId}    false
    Check Response Status Code    ${status_code}    ${response['status']}
    Check Response Status Code    ${status_code}    ${response['status']}
    [Teardown]    Delete Entity by Id Returning Response    ${entity_id}
    [Teardown]    Delete Entity by Id Returning Response    ${entity_id}
@@ -35,5 +34,10 @@ Delete Attributes
Setup Initial Entities
Setup Initial Entities
    ${valid_entity_id}=    Generate Random Entity Id    ${vehicle_id_prefix}
    ${valid_entity_id}=    Generate Random Entity Id    ${vehicle_id_prefix}
    Set Suite Variable    ${valid_entity_id}
    Set Suite Variable    ${valid_entity_id}
    ${request}    ${response}=    Create Entity Selecting Content Type    ${filename}    ${valid_entity_id}    ${CONTENT_TYPE_LD_JSON}
    Check Response Status Code    201    ${response['status']}
    ${not_found_entity_id}=    Generate Random Entity Id    ${vehicle_id_prefix}
    ${not_found_entity_id}=    Generate Random Entity Id    ${vehicle_id_prefix}
    Set Suite Variable    ${not_found_entity_id}
    Set Suite Variable    ${not_found_entity_id}

Delete Initial Entities
    Delete Entity by Id Returning Response    ${valid_entity_id}