[telepathy-salut/master] test-two-private-stream-tubes.py: check tube channels are in Requests's Channels property

Guillaume Desmottes guillaume.desmottes at collabora.co.uk
Wed Apr 15 07:34:41 PDT 2009


---
 .../twisted/avahi/test-two-private-stream-tubes.py |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)

diff --git a/tests/twisted/avahi/test-two-private-stream-tubes.py b/tests/twisted/avahi/test-two-private-stream-tubes.py
index 94cbe05..6421ff0 100644
--- a/tests/twisted/avahi/test-two-private-stream-tubes.py
+++ b/tests/twisted/avahi/test-two-private-stream-tubes.py
@@ -229,6 +229,10 @@ def test(q, bus, conn):
     channels = e.args[0]
     assert len(channels) == 2
 
+    # get the list of all channels to check that newly announced ones are in it
+    all_channels = conn.Get(CONN_IFACE_REQUESTS, 'Channels', dbus_interface=PROPERTIES_IFACE,
+        byte_arrays=True)
+
     got_tubes, got_tube = False, False
     for path, props in channels:
         if props[CHANNEL_TYPE] == CHANNEL_TYPE_TUBES:
@@ -252,6 +256,8 @@ def test(q, bus, conn):
         assert props[INITIATOR_ID] == contact1_name
         assert props[TARGET_ID] == contact2_name
 
+        assert (path, props) in all_channels, (path, props)
+
     assert got_tubes
     assert got_tube
 
@@ -274,6 +280,10 @@ def test(q, bus, conn):
     channels = new_chans.args[0]
     assert len(channels) == 2
 
+    # get the list of all channels to check that newly announced ones are in it
+    all_channels = conn2.Get(CONN_IFACE_REQUESTS, 'Channels', dbus_interface=PROPERTIES_IFACE,
+        byte_arrays=True)
+
     got_tubes, got_tube = False, False
     for path, props in channels:
         if props[CHANNEL_TYPE] == CHANNEL_TYPE_TUBES:
@@ -297,6 +307,8 @@ def test(q, bus, conn):
         assert props[INITIATOR_ID] == contact1_name
         assert props[TARGET_ID] == contact1_name
 
+        assert (path, props) in all_channels, (path, props)
+
     assert got_tubes
     assert got_tube
 
-- 
1.5.6.5




More information about the telepathy-commits mailing list