mirror of
https://gitlab.freedesktop.org/upower/upower.git
synced 2026-05-05 07:38:17 +02:00
linux: Test fix for warning when a duplicate device appears
Make the Bluetooth device appear first.
This commit is contained in:
parent
32b0e098a1
commit
810c1214a5
1 changed files with 11 additions and 11 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue