[gnome-bluetooth/wip/hadess/lib-changes] tests: Move dbus proxies assignment earlier in the test
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-bluetooth/wip/hadess/lib-changes] tests: Move dbus proxies assignment earlier in the test
- Date: Thu, 25 Nov 2021 17:20:33 +0000 (UTC)
commit 0785edc493ea5902b1778693599a1b6a6a7e3d61
Author: Bastien Nocera <hadess hadess net>
Date: Thu Nov 25 15:11:20 2021 +0100
tests: Move dbus proxies assignment earlier in the test
tests/integration-test | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/tests/integration-test b/tests/integration-test
index 4ef4d18e..b6dea1bf 100755
--- a/tests/integration-test
+++ b/tests/integration-test
@@ -105,6 +105,10 @@ class OopTests(dbusmock.DBusTestCase):
self.assertEqual(device.get_property('address'), '22:33:44:55:66:77')
def test_default_adapter(self):
+ bus = dbus.SystemBus()
+ bluez_server = bus.get_object('org.bluez', '/org/bluez')
+ dbusmock_bluez = dbus.Interface(bluez_server, 'org.bluez.Mock')
+
self.wait_for_condition(lambda: self.client.get_property('num-adapters') != 0)
self.assertEqual(self.client.get_property('num-adapters'), 2)
@@ -135,9 +139,6 @@ class OopTests(dbusmock.DBusTestCase):
self.assertEqual(device.get_property('address'), '22:33:44:55:66:77')
# Remove default adapter
- bus = dbus.SystemBus()
- bluez_server = bus.get_object('org.bluez', '/org/bluez')
- dbusmock_bluez = dbus.Interface(bluez_server, 'org.bluez.Mock')
dbusmock_bluez.RemoveAdapter('hci1')
self.wait_for_condition(lambda: self.client.get_property('num-adapters') != 2)
self.assertEqual(self.client.get_property('num-adapters'), 1)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]