aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristophe Ricard <christophe.ricard@gmail.com>2016-03-06 22:55:22 +0100
committerSamuel Ortiz <sameo@linux.intel.com>2016-03-13 23:10:01 +0100
commitd8a7aa6aedc117d70085e08b05f3fc4ccd590d3f (patch)
tree0b32e9b0ad362aa0cc0a703325e425c3653fa560
parent36ce8f5e89d1345c6a735d05213b019fa498bec0 (diff)
downloadneard-d8a7aa6aedc117d70085e08b05f3fc4ccd590d3f.tar.gz
test/neardutils: Few sanity cleanup
org.neard and org.neard.Record have their own variable SERVICE_NAME and RECORD_INTERFACE.
-rw-r--r--test/neardutils.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/test/neardutils.py b/test/neardutils.py
index 903e59e..d93ae63 100644
--- a/test/neardutils.py
+++ b/test/neardutils.py
@@ -8,7 +8,7 @@ RECORD_INTERFACE = SERVICE_NAME + ".Record"
def get_managed_objects():
bus = dbus.SystemBus()
- manager = dbus.Interface(bus.get_object("org.neard", "/"),
+ manager = dbus.Interface(bus.get_object(SERVICE_NAME, "/"),
"org.freedesktop.DBus.ObjectManager")
return manager.GetManagedObjects()
@@ -70,7 +70,7 @@ def find_record_in_objects(objects, pattern=None):
def dump_record(record_path):
bus = dbus.SystemBus()
- record_prop = dbus.Interface(bus.get_object("org.neard", record_path),
+ record_prop = dbus.Interface(bus.get_object(SERVICE_NAME, record_path),
"org.freedesktop.DBus.Properties")
properties = record_prop.GetAll(RECORD_INTERFACE)
@@ -84,11 +84,11 @@ def dump_record(record_path):
def dump_all_records(path):
bus = dbus.SystemBus()
- om = dbus.Interface(bus.get_object("org.neard", "/"),
+ om = dbus.Interface(bus.get_object(SERVICE_NAME, "/"),
"org.freedesktop.DBus.ObjectManager")
objects = om.GetManagedObjects()
for path, interfaces in objects.iteritems():
- if "org.neard.Record" not in interfaces:
+ if RECORD_INTERFACE not in interfaces:
continue
if path.startswith(path):