Skip to content

Commit

Permalink
chore: add a new test entity to test the nested structure of properties
Browse files Browse the repository at this point in the history
  • Loading branch information
djs0109 committed Jul 10, 2024
1 parent b41b7e4 commit 317cfb5
Showing 1 changed file with 31 additions and 1 deletion.
32 changes: 31 additions & 1 deletion tests/models/test_ngsi_ld_context.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,6 @@ def setUp(self) -> None:
}
self.entity2_dict.update(self.entity2_props_dict)
self.entity2_dict.update(self.entity2_rel_dict)

self.entity3_dict = {
"id": "urn:ngsi-ld:Vehicle:test1243",
"type": "Vehicle",
Expand All @@ -133,6 +132,37 @@ def setUp(self) -> None:
}
}
}
# The entity for testing the nested structure of properties
self.entity_sub_props_dict = {
"id": "urn:ngsi-ld:Vehicle:test1243",
"type": "Vehicle",
"prop1": {
"type": "Property",
"value": 1,
"sub_property": {
"type": "Property",
"value": 10,
"sub_sub_property": {
"type": "Property",
"value": 100
}
},
"sub_properties_list": [
{
"sub_prop_1": {
"value": 100,
"type": "Property"
}
},
{
"sub_prop_2": {
"value": 200,
"type": "Property"
}
}
],
}
}

def test_cb_attribute(self) -> None:
"""
Expand Down

0 comments on commit 317cfb5

Please sign in to comment.