[gnome-bluetooth/wip/hadess/add-midi-uuid: 3/3] tests: Test whether MIDI device is connectable
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-bluetooth/wip/hadess/add-midi-uuid: 3/3] tests: Test whether MIDI device is connectable
- Date: Thu, 10 Mar 2022 10:35:22 +0000 (UTC)
commit 41bf2dd04c1dd14d4f253bd122cd14f3e4fb128a
Author: Bastien Nocera <hadess hadess net>
Date: Thu Mar 10 11:34:29 2022 +0100
tests: Test whether MIDI device is connectable
tests/integration-test.py | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
---
diff --git a/tests/integration-test.py b/tests/integration-test.py
index ef57c879..4975d38f 100755
--- a/tests/integration-test.py
+++ b/tests/integration-test.py
@@ -426,7 +426,7 @@ class OopTests(dbusmock.DBusTestCase):
self.wait_for_mainloop()
list_store = client.get_devices()
- self.assertEqual(list_store.get_n_items(), 2)
+ self.assertEqual(list_store.get_n_items(), 3)
device = list_store.get_item(0)
self.assertEqual(device.props.alias, 'My Mouse')
@@ -436,6 +436,10 @@ class OopTests(dbusmock.DBusTestCase):
self.assertEqual(device.props.alias, 'My other device')
self.assertEqual(device.props.connectable, False)
+ device = list_store.get_item(2)
+ self.assertEqual(device.props.alias, 'My MIDI device')
+ self.assertEqual(device.props.connectable, True)
+
def test_adapter_removal(self):
bus = dbus.SystemBus()
@@ -584,6 +588,11 @@ class Tests(dbusmock.DBusTestCase):
path = self.dbusmock_bluez.AddDevice('hci0', '11:22:33:44:55:67', 'My other device')
+ path = self.dbusmock_bluez.AddDevice('hci0', '22:33:44:55:66:78', 'My MIDI')
+ dev = dbus.Interface(bus.get_object('org.bluez', path), 'org.freedesktop.DBus.Mock')
+ dev.UpdateProperties('org.bluez.Device1',
+ {'UUIDs': dbus.Array(['03B80E5A-EDE8-4B33-A751-6CE34EC4C700'], variant_level=1)})
+
self.run_test_process()
def test_battery(self):
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]