[folks/nielsdg/Fix-bluez-tests] tests/bluez: Follow PairDevice() API change




commit b6b7d41aad9e36e0d0e6ec9822ed2e310923c8fd
Author: Niels De Graef <nielsdegraef gmail com>
Date:   Tue Oct 11 20:27:41 2022 +0200

    tests/bluez: Follow PairDevice() API change
    
    Upstream python-dbusmock changed its API for `PairDevice()` to include a
    class parameter. For Python code, this API break was solved by providing
    a default value for the argument. Since we rely on the D-Bus interface
    however and D-Bus doesn't have a concept of default arguments, this just
    broke with an error:
    
    > Error setting up mock BlueZ device:
    > GDBus.Error:org.freedesktop.DBus.Error.InvalidArgs: Invalid arguments:
    > More items found in D-Bus signature than in Python arguments
    
    Add the same default argument in our Vala interface to work around the
    problem.
    
    Related links:
    * https://github.com/martinpitt/python-dbusmock/pull/45
    * https://github.com/martinpitt/python-dbusmock/issues/123

 tests/lib/bluez/backend.vala | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/tests/lib/bluez/backend.vala b/tests/lib/bluez/backend.vala
index 023117e6..72c688d3 100644
--- a/tests/lib/bluez/backend.vala
+++ b/tests/lib/bluez/backend.vala
@@ -39,7 +39,7 @@ namespace org
 
             [DBus (name = "PairDevice")]
             public abstract void pair_device (string adapter_device_name,
-                string device_address) throws GLib.Error;
+                string device_address, int class_=5898764) throws GLib.Error;
 
             [DBus (name = "BlockDevice")]
             public abstract void block_device (string adapter_device_name,


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]