summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorInga Stotland <inga.stotland@intel.com>2020-06-30 11:56:17 -0700
committerBrian Gix <brian.gix@intel.com>2020-07-01 12:06:07 -0700
commit15101b167831eb4fad1b5b60dc63f8a3b1827670 (patch)
tree577ca7176e0acd10cfcf12228cd6efb933abe322 /test
parent36dbc338141f32f6967b38e729eefb4c95a88e1a (diff)
downloadbluez-15101b167831eb4fad1b5b60dc63f8a3b1827670.tar.gz
test/test-mesh: Add options to "Models" property
This adds options dictionary to "Models" property to stay in sync with mesh-api changes.
Diffstat (limited to 'test')
-rwxr-xr-xtest/test-mesh21
1 files changed, 12 insertions, 9 deletions
diff --git a/test/test-mesh b/test/test-mesh
index 7c8a25482..5da0278d6 100755
--- a/test/test-mesh
+++ b/test/test-mesh
@@ -430,32 +430,35 @@ class Element(dbus.service.Object):
dbus.service.Object.__init__(self, bus, self.path)
def _get_sig_models(self):
- ids = []
+ mods = []
for model in self.models:
+ opts = []
id = model.get_id()
vendor = model.get_vendor()
if vendor == VENDOR_ID_NONE:
- ids.append(id)
- return ids
+ mod = (id, opts)
+ mods.append(mod)
+ return mods
def _get_v_models(self):
- ids = []
+ mods = []
for model in self.models:
+ opts = []
id = model.get_id()
v = model.get_vendor()
if v != VENDOR_ID_NONE:
- vendor_id = (v, id)
- ids.append(vendor_id)
- return ids
+ mod = (v, id, opts)
+ mods.append(mod)
+ return mods
def get_properties(self):
vendor_models = self._get_v_models()
sig_models = self._get_sig_models()
props = {'Index' : dbus.Byte(self.index)}
- props['Models'] = dbus.Array(sig_models, signature='q')
+ props['Models'] = dbus.Array(sig_models, signature='(qa{sv})')
props['VendorModels'] = dbus.Array(vendor_models,
- signature='(qq)')
+ signature='(qqa{sv})')
#print(props)
return { MESH_ELEMENT_IFACE: props }