Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dbusmock/templates/bluez5.py still calls PairDevice with 3 arguments #193

Closed
smcv opened this issue Dec 30, 2023 · 0 comments · Fixed by #194
Closed

dbusmock/templates/bluez5.py still calls PairDevice with 3 arguments #193

smcv opened this issue Dec 30, 2023 · 0 comments · Fixed by #194

Comments

@smcv
Copy link
Contributor

smcv commented Dec 30, 2023

The dbusmock mockup of bluez appears to implement PairDevice(), a dbusmock-specific convenience method, which changed from 3 to 2 arguments in 63264e1. Unfortunately, dbusmock/templates/bluez5.py still passes the third (class) argument, leading to the gnome-bluetooth test suite failing, even after applying https://gitlab.gnome.org/GNOME/gnome-bluetooth/-/merge_requests/175:

1703969200.285 GetManagedObjects
1703969200.285 GetAll /org/freedesktop/UPower org.freedesktop.UPower
1703969200.286 EnumerateDevices
1703969200.287 Pair
1703969200.287 Pair raised: org.freedesktop.DBus.Error.InvalidArgs: Invalid arguments: Fewer items found in D-Bus signature than in Python arguments

(I think it would also be good if any dbusmock-specific methods could be renamed to MockPairDevice() or similar to make it clearer that they are not part of the real API that is being mocked-up.)

smcv added a commit to smcv/python-dbusmock that referenced this issue Dec 30, 2023
The third (device class) argument to PairDevice was removed in 0.30.1,
but this call to it was still passing a third parameter, resulting in
an error from dbus-python whenever Pair() was called. This caused a
unit test regression in gnome-bluetooth.

Fixes: 63264e1 "bluez5: Clean up static default properties, re-drop PairDevice class_ parameter"
Resolves: martinpitt#193
Bug-Debian: https://bugs.debian.org/1057564
Signed-off-by: Simon McVittie <smcv@debian.org>
martinpitt pushed a commit that referenced this issue Dec 31, 2023
The third (device class) argument to PairDevice was removed in 0.30.1,
but this call to it was still passing a third parameter, resulting in
an error from dbus-python whenever Pair() was called. This caused a
unit test regression in gnome-bluetooth.

Fixes: 63264e1 "bluez5: Clean up static default properties, re-drop PairDevice class_ parameter"
Fixes #193
Bug-Debian: https://bugs.debian.org/1057564

Signed-off-by: Simon McVittie <smcv@debian.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant