pytest_bluezenv.Agent.object_method#

Agent.object_method(obj, method, *a, **kw)[source]#

Call DBus method of an object and handle reply as async events.

The event names are {iface}.{method}:reply and {iface}.{method}:error.

Parameters:
  • obj (dbus.Interface) – interface whose method to call

  • method (str) – method name

  • *a – method arguments

  • **kw – method arguments

Example

obj = dbus.Interface(bus.get_object(BUS_NAME, "/"), "org.freedesktop.DBus.ObjectManager")
self.object_method(obj, "GetManagedObjects")
event = self.expect("org.freedesktop.DBus.ObjectManager.GetManagedObjects:reply")