Commit 92d9a9af authored by lopezaguilar's avatar lopezaguilar
Browse files

Resolve new changes in robot file

parent 7b605fc4
Loading
Loading
Loading
Loading
+6 −2
Original line number Original line Diff line number Diff line
@@ -140,7 +140,7 @@ class Requests:
            },
            },
            'Query Context Source Registrations': {
            'Query Context Source Registrations': {
                'positions': [],
                'positions': [],
                'params': ['context', 'id', 'type', 'attrs',
                'params': ['context', 'id', 'type', 'idPattern', 'attrs',
                           'q', 'csf', 'georel', 'geometry',
                           'q', 'csf', 'georel', 'geometry',
                           'coordinates', 'geoproperty', 'timeproperty', 'timerel',
                           'coordinates', 'geoproperty', 'timeproperty', 'timerel',
                           'timeAt', 'limit', 'page', 'accept']
                           'timeAt', 'limit', 'page', 'accept']
@@ -1353,11 +1353,13 @@ class Requests:


    @staticmethod
    @staticmethod
    def query_context_source_registrations(kwargs) -> str:
    def query_context_source_registrations(kwargs) -> str:
        expected_parameters = ['context', 'id', 'type', 'attrs',
        expected_parameters = ['context', 'id', 'type', 'idPattern', 'attrs',
                               'q', 'csf', 'georel', 'geometry',
                               'q', 'csf', 'georel', 'geometry',
                               'coordinates', 'geoproperty', 'timeproperty', 'timerel',
                               'coordinates', 'geoproperty', 'timeproperty', 'timerel',
                               'timeAt', 'limit', 'page', 'accept']
                               'timeAt', 'limit', 'page', 'accept']


        # kwargs = {key: kwargs.get(key, '${EMPTY}') for key in expected_parameters}

        result = [x for x in kwargs if x not in expected_parameters]
        result = [x for x in kwargs if x not in expected_parameters]
        response = "Retrieve Temporal Representation of Entity"
        response = "Retrieve Temporal Representation of Entity"
        for key, value in kwargs.items():
        for key, value in kwargs.items():
@@ -1370,6 +1372,8 @@ class Requests:
                    response = f"{response} and\n    Query Parameter: type set to '{value}'"
                    response = f"{response} and\n    Query Parameter: type set to '{value}'"
                case 'attrs':
                case 'attrs':
                    response = f"{response} and\n    Query Parameter: attrs set to '{value}'"
                    response = f"{response} and\n    Query Parameter: attrs set to '{value}'"
                case 'idPattern':
                    response = f"{response} and\n    Query Parameter: idPattern set to '{value}'"
                case 'q':
                case 'q':
                    response = f"{response} and\n    Query Parameter: q set to '{value}'"
                    response = f"{response} and\n    Query Parameter: q set to '{value}'"
                case 'csf':
                case 'csf':
+2 −2
Original line number Original line Diff line number Diff line
@@ -26,8 +26,8 @@
      "endpoint": "entityOperations/create"
      "endpoint": "entityOperations/create"
    },
    },
    {
    {
      "name": "003_03_01 EmptyJson",
      "name": "003_03_02 EmptyJson",
      "permutation_tp_id": "TP/NGSI-LD/CI/Prov/BE/003_03_01",
      "permutation_tp_id": "TP/NGSI-LD/CI/Prov/BE/003_03_02",
      "doc": "Check that you cannot create a batch of entities with an invalid request",
      "doc": "Check that you cannot create a batch of entities with an invalid request",
      "tags": [
      "tags": [
        "5_6_7",
        "5_6_7",
+1 −1
Original line number Original line Diff line number Diff line
{
{
  "tp_id": "TP/NGSI-LD/CI/Prov/EA/011_04",
  "tp_id": "TP/NGSI-LD/CI/Prov/EA/011_04",
  "test_objective": "Check that you cannot update entity attributes with invalid/missing id or invalid request body",
  "test_objective": "Check that you cannot update entity attributes with invalid request body",
  "reference": "ETSI GS CIM 009 V1.3.1 [], clause 5.6.2",
  "reference": "ETSI GS CIM 009 V1.3.1 [], clause 5.6.2",
  "config_id": "",
  "config_id": "",
  "parent_release": "v1.3.1",
  "parent_release": "v1.3.1",
+7 −7
Original line number Original line Diff line number Diff line
@@ -7,7 +7,7 @@
  "pics_selection": "PICS_5_6_5",
  "pics_selection": "PICS_5_6_5",
  "keywords": [],
  "keywords": [],
  "teardown": "None",
  "teardown": "None",
  "initial_condition": "with {\n   the SUT containing an initial state\n}",
  "initial_condition": "with {\n    the SUT being in the \"initial state\" and\n    the SUT containing an initial Entity ${entity} \n        with an id set to ${entityId} \n}",
  "test_cases": [
  "test_cases": [
    {
    {
      "name": "013_02_01 Delete an attribute if the Entity Id is not present",
      "name": "013_02_01 Delete an attribute if the Entity Id is not present",
@@ -17,10 +17,10 @@
        "ea-delete",
        "ea-delete",
        "5_6_5"
        "5_6_5"
      ],
      ],
      "setup": null,
      "setup": "Create Initial Entity",
      "teardown": "Delete Initial Entity",
      "teardown": "Delete Initial Entity",
      "template": "Delete Attributes",
      "template": "Delete Attributes",
      "then": "then {\n    the SUT sends a valid Response for the operations:\n        Create Entity Selecting Content Type with Response Status Code set to 201     and\n        Delete Entity Attributes with Response Status Code set to 400\n}",
      "then": "then {\n    the SUT sends a valid Response for the operation:\n        Delete Entity Attributes with Response Status Code set to 400\n}",
      "when": "when {\n    the SUT receives a Request from the client containing:\n        URL set to '/ngsi-ld/v1/entities/{entityId}/attrs/{attributeId}?${params_as_string}'\n        method set to 'DELETE'\n        Delete Entity Attributes: and\n    Query Parameter: entityId set to '${EMPTY}' and\n    Query Parameter: attributeId set to 'speed' and\n    Query Parameter: datasetId set to '${EMPTY}' and\n    Query Parameter: deleteAll set to 'false'\n}",
      "when": "when {\n    the SUT receives a Request from the client containing:\n        URL set to '/ngsi-ld/v1/entities/{entityId}/attrs/{attributeId}?${params_as_string}'\n        method set to 'DELETE'\n        Delete Entity Attributes: and\n    Query Parameter: entityId set to '${EMPTY}' and\n    Query Parameter: attributeId set to 'speed' and\n    Query Parameter: datasetId set to '${EMPTY}' and\n    Query Parameter: deleteAll set to 'false'\n}",
      "http_verb": "DELETE",
      "http_verb": "DELETE",
      "endpoint": "entities/{entityId}/attrs/{attributeId}?${params_as_string}"
      "endpoint": "entities/{entityId}/attrs/{attributeId}?${params_as_string}"
@@ -33,10 +33,10 @@
        "ea-delete",
        "ea-delete",
        "5_6_5"
        "5_6_5"
      ],
      ],
      "setup": null,
      "setup": "Create Initial Entity",
      "teardown": "Delete Initial Entity",
      "teardown": "Delete Initial Entity",
      "template": "Delete Attributes",
      "template": "Delete Attributes",
      "then": "then {\n    the SUT sends a valid Response for the operations:\n        Create Entity Selecting Content Type with Response Status Code set to 201     and\n        Delete Entity Attributes with Response Status Code set to 400\n}",
      "then": "then {\n    the SUT sends a valid Response for the operation:\n        Delete Entity Attributes with Response Status Code set to 400\n}",
      "when": "when {\n    the SUT receives a Request from the client containing:\n        URL set to '/ngsi-ld/v1/entities/{entityId}/attrs/{attributeId}?${params_as_string}'\n        method set to 'DELETE'\n        Delete Entity Attributes: and\n    Query Parameter: entityId set to 'thisIsAnInvalidURI' and\n    Query Parameter: attributeId set to 'speed' and\n    Query Parameter: datasetId set to '${EMPTY}' and\n    Query Parameter: deleteAll set to 'false'\n}",
      "when": "when {\n    the SUT receives a Request from the client containing:\n        URL set to '/ngsi-ld/v1/entities/{entityId}/attrs/{attributeId}?${params_as_string}'\n        method set to 'DELETE'\n        Delete Entity Attributes: and\n    Query Parameter: entityId set to 'thisIsAnInvalidURI' and\n    Query Parameter: attributeId set to 'speed' and\n    Query Parameter: datasetId set to '${EMPTY}' and\n    Query Parameter: deleteAll set to 'false'\n}",
      "http_verb": "DELETE",
      "http_verb": "DELETE",
      "endpoint": "entities/{entityId}/attrs/{attributeId}?${params_as_string}"
      "endpoint": "entities/{entityId}/attrs/{attributeId}?${params_as_string}"
@@ -49,10 +49,10 @@
        "ea-delete",
        "ea-delete",
        "5_6_5"
        "5_6_5"
      ],
      ],
      "setup": null,
      "setup": "Create Initial Entity",
      "teardown": "Delete Initial Entity",
      "teardown": "Delete Initial Entity",
      "template": "Delete Attributes",
      "template": "Delete Attributes",
      "then": "then {\n    the SUT sends a valid Response for the operations:\n        Create Entity Selecting Content Type with Response Status Code set to 201     and\n        Delete Entity Attributes with Response Status Code set to 405\n}",
      "then": "then {\n    the SUT sends a valid Response for the operation:\n        Delete Entity Attributes with Response Status Code set to 405\n}",
      "when": "when {\n    the SUT receives a Request from the client containing:\n        URL set to '/ngsi-ld/v1/entities/{entityId}/attrs/{attributeId}?${params_as_string}'\n        method set to 'DELETE'\n        Delete Entity Attributes: and\n    Query Parameter: entityId set to '${valid_entity_id}' and\n    Query Parameter: attributeId set to '${EMPTY}' and\n    Query Parameter: datasetId set to '${EMPTY}' and\n    Query Parameter: deleteAll set to 'false'\n}",
      "when": "when {\n    the SUT receives a Request from the client containing:\n        URL set to '/ngsi-ld/v1/entities/{entityId}/attrs/{attributeId}?${params_as_string}'\n        method set to 'DELETE'\n        Delete Entity Attributes: and\n    Query Parameter: entityId set to '${valid_entity_id}' and\n    Query Parameter: attributeId set to '${EMPTY}' and\n    Query Parameter: datasetId set to '${EMPTY}' and\n    Query Parameter: deleteAll set to 'false'\n}",
      "http_verb": "DELETE",
      "http_verb": "DELETE",
      "endpoint": "entities/{entityId}/attrs/{attributeId}?${params_as_string}"
      "endpoint": "entities/{entityId}/attrs/{attributeId}?${params_as_string}"
+2 −2
Original line number Original line Diff line number Diff line
{
{
  "tp_id": "TP/NGSI-LD/CI/SUB/046_09",
  "tp_id": "TP/NGSI-LD/CI/SUB/046_09",
  "test_objective": "A Notification shall be sent (as mandated by each concrete binding and including any optional endpoint.info defined by clause 5.2.22) to the endpoint specified by the endpoint.uri member of the notification structure defined by clause 5.2.14",
  "test_objective": "A Notification shall be sent (as mandated by each concrete binding and including any optional endpoint.receiverInfo defined by clause 5.2.22) to the endpoint specified by the endpoint.uri member of the notification structure defined by clause 5.2.14",
  "reference": "ETSI GS CIM 009 V1.3.1 [], clause 5.8.6",
  "reference": "ETSI GS CIM 009 V1.3.1 [], clause 5.8.6",
  "config_id": "",
  "config_id": "",
  "parent_release": "v1.3.1",
  "parent_release": "v1.3.1",
@@ -15,7 +15,7 @@
    {
    {
      "name": "046_09_01 Check that a notification is sent to the endpoint",
      "name": "046_09_01 Check that a notification is sent to the endpoint",
      "permutation_tp_id": "TP/NGSI-LD/CI/SUB/046_09_01",
      "permutation_tp_id": "TP/NGSI-LD/CI/SUB/046_09_01",
      "doc": "A Notification shall be sent (as mandated by each concrete binding and including any optional endpoint.info defined by clause 5.2.22) to the endpoint specified by the endpoint.uri member of the notification structure defined by clause 5.2.1",
      "doc": "A Notification shall be sent (as mandated by each concrete binding and including any optional endpoint.receiverInfo defined by clause 5.2.22) to the endpoint specified by the endpoint.uri member of the notification structure defined by clause 5.2.1",
      "tags": [
      "tags": [
        "046_09",
        "046_09",
        "5_8_6",
        "5_8_6",
Loading