diff options
author | Bastien Nocera <hadess@hadess.net> | 2023-02-28 13:51:23 +0100 |
---|---|---|
committer | Bastien Nocera <hadess@hadess.net> | 2023-02-28 14:14:59 +0100 |
commit | 810c1214a502e647b2fe029c25bfec2b184693e7 (patch) | |
tree | 89beb0a9cb57678e94bf46dbb230ac167b1617d1 | |
parent | 32b0e098a1c35f2543b2b49807b08a468b006dc9 (diff) | |
download | upower-810c1214a502e647b2fe029c25bfec2b184693e7.tar.gz |
linux: Test fix for warning when a duplicate device appears
Make the Bluetooth device appear first.
-rwxr-xr-x | src/linux/integration-test.py | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/linux/integration-test.py b/src/linux/integration-test.py index e44c0e3..0898e0d 100755 --- a/src/linux/integration-test.py +++ b/src/linux/integration-test.py @@ -2239,6 +2239,17 @@ class Tests(dbusmock.DBusTestCase): udevs = [] + # Add Bluetooth LE device + alias = 'Logitech Bluetooth Name' + battery_level = 99 + device_properties = { + 'Appearance': dbus.UInt16(0x03c2, variant_level=1) + } + + devs = self._add_bluez_battery_device(alias, device_properties, battery_level) + bluez_dev_path = '/org/bluez/hci0/dev_11_22_33_44_AA_BB' + self.assertEqual(len(devs), 1) + # Add HID++ kernel device parent = self.testbed.add_device('usb', 'pci0000:00/0000:00:14.0/usb3/3-10/3-10:1.2', @@ -2280,17 +2291,6 @@ class Tests(dbusmock.DBusTestCase): udevs.insert(0, _dev) devs = self.proxy.EnumerateDevices() self.assertEqual(len(devs), 1) - - # Add Bluetooth LE device - alias = 'Logitech Bluetooth Name' - battery_level = 99 - device_properties = { - 'Appearance': dbus.UInt16(0x03c2, variant_level=1) - } - - devs = self._add_bluez_battery_device(alias, device_properties, battery_level) - bluez_dev_path = '/org/bluez/hci0/dev_11_22_33_44_AA_BB' - self.assertEqual(len(devs), 1) bat0_up = devs[0] # Check we have the Bluetooth name |