summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorInga Stotland <inga.stotland@intel.com>2019-07-25 11:31:45 -0700
committerBrian Gix <brian.gix@intel.com>2019-07-26 09:08:58 -0700
commitb1ecae6b01d99ee926631d696f86cc35f83939cf (patch)
tree12c9d7ac55a27f35dc3ee5642f00c3062fe1f09b /test
parentefcf88bff0dc9daf98a3862133c5b0b0cc72d30e (diff)
downloadbluez-b1ecae6b01d99ee926631d696f86cc35f83939cf.tar.gz
test/test-mesh: Initialize required properties
This initialized required "Models" and "VendorModels" properties wheher the actual models exist or not, according to the mesh-api.txt. In case when an element does not contain either SIG defined models or vendor defineed models, the corresponding properties should contain empty arrays.
Diffstat (limited to 'test')
-rwxr-xr-xtest/test-mesh6
1 files changed, 2 insertions, 4 deletions
diff --git a/test/test-mesh b/test/test-mesh
index 6e9196366..3c5ded7b3 100755
--- a/test/test-mesh
+++ b/test/test-mesh
@@ -537,10 +537,8 @@ class Element(dbus.service.Object):
sig_models = self._get_sig_models()
props = {'Index' : dbus.Byte(self.index)}
- if len(sig_models) != 0:
- props['Models'] = dbus.Array(sig_models, signature='q')
- if len(vendor_models) != 0:
- props['VendorModels'] = dbus.Array(vendor_models,
+ props['Models'] = dbus.Array(sig_models, signature='q')
+ props['VendorModels'] = dbus.Array(vendor_models,
signature='(qq)')
#print(props)
return { MESH_ELEMENT_IFACE: props }