mirror of
https://gitlab.freedesktop.org/upower/upower.git
synced 2025-12-20 04:20:04 +01:00
linux: Adjust test_bluetooth_le_device for dbusmock 0.30.1
dbusmock 0.30.1 changed the BlueZ template to set the default "Class" property to `MOCK_PHONE_CLASS` right away instead of in PairDevice() [1]. test_bluetooth_le_device() relied on the previous implicit default of a "0" Class value. Set this explicitly to expect a "generic" device. This makes the test work with old and current dbusmock versions. https://bugs.debian.org/1059467 [1] https://github.com/martinpitt/python-dbusmock/pull/192
This commit is contained in:
parent
dfde9e2274
commit
bd1e4698f4
1 changed files with 3 additions and 1 deletions
|
|
@ -2162,7 +2162,9 @@ class Tests(dbusmock.DBusTestCase):
|
|||
|
||||
alias = 'Satechi M1 Mouse'
|
||||
battery_level = 99
|
||||
device_properties = None
|
||||
device_properties = {
|
||||
'Class': dbus.UInt32(0, variant_level=1)
|
||||
}
|
||||
|
||||
devs = self._add_bluez_battery_device(alias, device_properties, battery_level)
|
||||
self.assertEqual(len(devs), 1)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue