summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorBastien Nocera <hadess@hadess.net>2021-12-15 14:43:31 +0100
committerBastien Nocera <hadess@hadess.net>2021-12-15 17:14:48 +0100
commit777dcf752c4bf3dadf645c7da36b7ae4edd78067 (patch)
tree81e50f58f8cc5a9de3f920210ff576f0e1149cc4 /tests
parentb7f179805a6be40312e5f61d0d2028887887a23c (diff)
downloadgnome-bluetooth-777dcf752c4bf3dadf645c7da36b7ae4edd78067.tar.gz
tests: Test that we unregister the pairing agent correctly
Diffstat (limited to 'tests')
-rwxr-xr-xtests/integration-test18
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/integration-test b/tests/integration-test
index 131dcfe4..502c63e2 100755
--- a/tests/integration-test
+++ b/tests/integration-test
@@ -306,8 +306,26 @@ class OopTests(dbusmock.DBusTestCase):
self.assertIsNotNone(agent)
# Process D-Bus daemon appearing and agent being registered
self.wait_for_mainloop()
+
self.assertTrue(agent.register())
+ self.wait_for_mainloop()
+
self.assertTrue(agent.unregister())
+ self.wait_for_mainloop()
+
+ # Check that we don't have a re-register warning
+ self.assertTrue(agent.register())
+ self.wait_for_mainloop()
+
+ agent.unregister()
+ self.wait_for_mainloop()
+
+ # And try again
+ agent = GnomeBluetoothPriv.Agent.new ('/org/gnome/bluetooth/integration_test')
+ self.assertIsNotNone(agent)
+ self.wait_for_mainloop()
+ agent.unregister()
+ self.wait_for_mainloop()
class Tests(dbusmock.DBusTestCase):