Skip to content
GitLab
Explore
Sign in
CIM - Context Information Management
NGSI-LD Test Suite
Compare revisions
05ffa85ba2d8c3a179f189047e8be5be67cd1ed6 to 1b8cdbda875e321d65a9a89c843b2a6852aa8abd
Hide whitespace changes
Inline
Side-by-side
doc/tests/test_ContextInformation_Subscription.py
View file @
1b8cdbda
...
...
@@ -203,6 +203,20 @@ class TestCISubscription(TestCase):
self
.
common_function
(
robot_file
=
robot_file
,
expected_value
=
expected_value
,
difference_file
=
difference_file
)
def
test_046_16_01
(
self
):
robot_file
=
f
'
{
self
.
folder_test_suites
}
/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_16_01.robot
'
expected_value
=
f
'
{
self
.
folder_test_suites
}
/doc/files/ContextInformation/Subscription/046_16_01.json
'
difference_file
=
f
'
{
self
.
folder_test_suites
}
/doc/results/out_046_16_01.json
'
self
.
common_function
(
robot_file
=
robot_file
,
expected_value
=
expected_value
,
difference_file
=
difference_file
)
def
test_046_16_02
(
self
):
robot_file
=
f
'
{
self
.
folder_test_suites
}
/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_16_02.robot
'
expected_value
=
f
'
{
self
.
folder_test_suites
}
/doc/files/ContextInformation/Subscription/046_16_02.json
'
difference_file
=
f
'
{
self
.
folder_test_suites
}
/doc/results/out_046_16_02.json
'
self
.
common_function
(
robot_file
=
robot_file
,
expected_value
=
expected_value
,
difference_file
=
difference_file
)
def
test_031_01
(
self
):
robot_file
=
f
'
{
self
.
folder_test_suites
}
/TP/NGSI-LD/ContextInformation/Subscription/QuerySubscriptions/031_01.robot
'
expected_value
=
f
'
{
self
.
folder_test_suites
}
/doc/files/ContextInformation/Subscription/031_01.json
'
...
...
resources/ApiUtils/ContextInformationConsumption.resource
View file @
1b8cdbda
...
...
@@ -35,6 +35,7 @@ Query Entities
... ${options}=${EMPTY}
... ${limit}=${EMPTY}
... ${entity_id_pattern}=${EMPTY}
... ${scopeq}=${EMPTY}
... ${georel}=${EMPTY}
... ${coordinates}=${EMPTY}
... ${geometry}=${EMPTY}
...
...
@@ -72,6 +73,7 @@ Query Entities
IF '${entity_id_pattern}'!=''
Set To Dictionary ${params} idPattern=${entity_id_pattern}
END
IF '${scopeq}'!='' Set To Dictionary ${params} scopeQ=${scopeq}
IF '${georel}'!='' Set To Dictionary ${params} georel=${georel}
IF '${coordinates}'!=''
Set To Dictionary ${params} coordinates=${coordinates}
...
...
@@ -146,9 +148,11 @@ Query Entity
... ${context}=${EMPTY}
... ${geoproperty}=${EMPTY}
... ${options}=${EMPTY}
... ${lang}=${EMPTY}
${attrs_length}= Get Length ${attrs}
${accept_length}= Get Length ${accept}
${options_length}= Get Length ${options}
${lang_length}= Get Length ${lang}
&{headers}= Create Dictionary
&{params}= Create Dictionary
IF ${accept_length}>0
...
...
@@ -166,6 +170,7 @@ Query Entity
IF ${options_length}>0
Set To Dictionary ${params} options=${options}
END
IF ${lang_length}>0 Set To Dictionary ${params} lang=${lang}
${response}= GET
... url=${url}/${ENTITIES_ENDPOINT_PATH}${id}
...
...
resources/ApiUtils/TemporalContextInformationConsumption.resource
View file @
1b8cdbda
...
...
@@ -188,6 +188,8 @@ Retrieve Temporal Representation Of Entity
... ${endTimeAt}=${EMPTY}
... ${lastN}=${EMPTY}
... ${accept}=${EMPTY}
... ${aggrMethods}=${EMPTY}
... ${aggrPeriodDuration}=${EMPTY}
${attrs_length}= Get Length ${attrs}
${options_length}= Get Length ${options}
&{headers}= Create Dictionary
...
...
@@ -211,6 +213,12 @@ Retrieve Temporal Representation Of Entity
Set To Dictionary ${params} endTimeAt=${endTimeAt}
END
IF '${lastN}'!='' Set To Dictionary ${params} lastN=${lastN}
IF '${aggrMethods}'!=''
Set To Dictionary ${params} aggrMethods=${aggrMethods}
END
IF '${aggrPeriodDuration}'!=''
Set To Dictionary ${params} aggrPeriodDuration=${aggrPeriodDuration}
END
${response}= GET
... url=${temporal_api_url}/${TEMPORAL_ENTITIES_ENDPOINT_PATH}/${temporal_entity_representation_id}
...
...
resources/AssertionUtils.resource
View file @
1b8cdbda
...
...
@@ -34,6 +34,15 @@ Check Response Body Containing Array Of URIs set to
[Arguments] ${expected_entities_ids} ${response_body}
Lists Should Be Equal ${expected_entities_ids} ${response_body} ignore_order=True
Check Response Body Containing Entities URIS set to
[Arguments] ${expected_entities_ids} ${response_body}
@{response_entities_ids}= Create List
FOR ${entity} IN @{response_body}
Append To List ${response_entities_ids} ${entity['id']}
END
Lists Should Be Equal ${expected_entities_ids} ${response_entities_ids}
Check Response Body Content
[Arguments] ${expectation_filename} ${response_body} ${additional_ignored_path}=${EMPTY}
${entity_payload}= Load JSON From File ${EXECDIR}/data/entities/expectations/${expectation_filename}
...
...
Prev
1
2
3
4
5
Next