diff options
author | Jonny Lamb <jonny.lamb@collabora.co.uk> | 2013-07-25 14:23:36 +0200 |
---|---|---|
committer | Jonny Lamb <jonny.lamb@collabora.co.uk> | 2013-07-25 14:23:36 +0200 |
commit | 1faaaca87037710473ced8187414a295b872ebe9 (patch) | |
tree | b27fa7b24522347c5e20566378cbb6a68dcd191e | |
parent | aa1fd4dc9256b63e74f930e81cd755b8c58a716b (diff) |
phoenix-test: disconnect notify::connection from account upon starting test
This script is fire once so once we have the connection we won't care
about any further connections. This also removes failures later on
when the connection disappears on disconnection.
-rwxr-xr-x | src/phoenix-test.py | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/phoenix-test.py b/src/phoenix-test.py index df89594..5acc150 100755 --- a/src/phoenix-test.py +++ b/src/phoenix-test.py @@ -202,9 +202,7 @@ class TestAccount: self.t.assertEqual (False, account.is_enabled()) - self.account.connect("notify::connection-status", - self.connection_status_cb, None) - self.account.connect("notify::connection", + self.connection_notify_id = self.account.connect("notify::connection", self.connection_cb, None) # Enable & Request availability, causing our connection to be setup @@ -219,13 +217,12 @@ class TestAccount: s = self.account.get_property ("connection-status") self.t.assertNotEqual (Tp.ConnectionStatus.DISCONNECTED, s) + self.account.disconnect(self.connection_notify_id) + c = self.account.get_property ("connection") if s == Tp.ConnectionStatus.CONNECTED and c != None: TestConnection (self.t, c) - def connection_status_cb (self, account, spec, data): - self.connection_test_if_possible () - def connection_cb (self, account, spec, data): self.connection_test_if_possible () |