[gnome-bluetooth/wip/hadess/cleanups: 9/9] lib: Add BluetoothAgent test




commit a62b71ec67d7a39354dd52535e5035a6bd8bcee9
Author: Bastien Nocera <hadess hadess net>
Date:   Wed Feb 17 16:21:02 2021 +0100

    lib: Add BluetoothAgent test

 tests/integration-test | 11 +++++++++++
 1 file changed, 11 insertions(+)
---
diff --git a/tests/integration-test b/tests/integration-test
index 779cc141..72b4b8d0 100755
--- a/tests/integration-test
+++ b/tests/integration-test
@@ -133,6 +133,14 @@ class OopTests(dbusmock.DBusTestCase):
         self.assertEqual(devices.get_value(treeiter, GnomeBluetoothPriv.Column.PAIRED), True)
         self.assertEqual(devices.get_value(treeiter, GnomeBluetoothPriv.Column.ICON), 'phone')
 
+    def test_agent(self):
+        agent = GnomeBluetoothPriv.Agent.new ('/org/gnome/bluetooth/integration_test')
+        self.assertIsNotNone(agent)
+        # Process D-Bus daemon appearing and agent being registered
+        self.wait_for_mainloop()
+        self.assertTrue(agent.register())
+        self.assertTrue(agent.unregister())
+
 class Tests(dbusmock.DBusTestCase):
 
     @classmethod
@@ -187,5 +195,8 @@ class Tests(dbusmock.DBusTestCase):
 
         self.run_test_process()
 
+    def test_agent(self):
+        self.run_test_process()
+
 if __name__ == '__main__':
     unittest.main()


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]