diff options
author | Niels De Graef <nielsdegraef@gmail.com> | 2022-10-11 20:27:41 +0200 |
---|---|---|
committer | Niels De Graef <ndegraef@redhat.com> | 2022-10-11 20:35:50 +0200 |
commit | b6b7d41aad9e36e0d0e6ec9822ed2e310923c8fd (patch) | |
tree | d66bdcb8bd3cbcb1e1a228a8c26093df990720f6 | |
parent | 8f472fc382e81464cb9da5090638071c3c646226 (diff) | |
download | folks-nielsdg/Fix-bluez-tests.tar.gz |
tests/bluez: Follow PairDevice() API changenielsdg/Fix-bluez-tests
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
-rw-r--r-- | tests/lib/bluez/backend.vala | 2 |
1 files changed, 1 insertions, 1 deletions
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, |