diff options
author | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2013-10-08 12:53:17 -0400 |
---|---|---|
committer | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2013-10-08 12:53:17 -0400 |
commit | decfd694e6dc62613f3ee9ea620c21160b3ebb2c (patch) | |
tree | 72ed2ca3f3c4bed077465d8c470dd7e8cb9a779f /tests | |
parent | 0089204ffe2245c2bf8682dc3325107dc7dde956 (diff) |
test-twice: stop waiting for roster channels
Wait for the contact list to be loaded instead.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/twisted/connect/test-twice.py | 26 |
1 files changed, 4 insertions, 22 deletions
diff --git a/tests/twisted/connect/test-twice.py b/tests/twisted/connect/test-twice.py index 437ecec61..9ab1b09f7 100644 --- a/tests/twisted/connect/test-twice.py +++ b/tests/twisted/connect/test-twice.py @@ -9,8 +9,6 @@ import dbus import constants as cs from gabbletest import exec_test -from rostertest import expect_contact_list_signals, check_contact_list_signals -from servicetest import assertLength def test(q, bus, conns, streams): @@ -30,16 +28,8 @@ def test(q, bus, conns, streams): args=[cs.CONN_STATUS_CONNECTED, cs.CSR_REQUESTED], path=conn1.object.object_path) - pairs = expect_contact_list_signals(q, bus, conn1, - ['publish', 'subscribe', 'stored']) - - check_contact_list_signals(q, bus, conn1, pairs.pop(0), cs.HT_LIST, - 'publish', []) - check_contact_list_signals(q, bus, conn1, pairs.pop(0), cs.HT_LIST, - 'subscribe', []) - check_contact_list_signals(q, bus, conn1, pairs.pop(0), cs.HT_LIST, - 'stored', []) - assertLength(0, pairs) # i.e. we popped and checked all of them + q.expect('dbus-signal', signal='ContactListStateChanged', + args=[cs.CONTACT_LIST_STATE_SUCCESS], path=conn1.object.object_path) # Connection 2 conn2.Connect() @@ -54,16 +44,8 @@ def test(q, bus, conns, streams): args=[cs.CONN_STATUS_CONNECTED, cs.CSR_REQUESTED], path=conn2.object.object_path) - pairs = expect_contact_list_signals(q, bus, conn2, - ['publish', 'subscribe', 'stored']) - - check_contact_list_signals(q, bus, conn2, pairs.pop(0), cs.HT_LIST, - 'publish', []) - check_contact_list_signals(q, bus, conn2, pairs.pop(0), cs.HT_LIST, - 'subscribe', []) - check_contact_list_signals(q, bus, conn2, pairs.pop(0), cs.HT_LIST, - 'stored', []) - assertLength(0, pairs) # i.e. we popped and checked all of them + q.expect('dbus-signal', signal='ContactListStateChanged', + args=[cs.CONTACT_LIST_STATE_SUCCESS], path=conn2.object.object_path) if __name__ == '__main__': exec_test(test, num_instances=2, do_connect=False) |