[telepathy-salut/master] test-two-muc-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:07 PDT 2009
---
tests/twisted/avahi/test-two-muc-stream-tubes.py | 12 ++++++++++++
1 files changed, 12 insertions(+), 0 deletions(-)
diff --git a/tests/twisted/avahi/test-two-muc-stream-tubes.py b/tests/twisted/avahi/test-two-muc-stream-tubes.py
index 15c6381..1e67e06 100644
--- a/tests/twisted/avahi/test-two-muc-stream-tubes.py
+++ b/tests/twisted/avahi/test-two-muc-stream-tubes.py
@@ -304,6 +304,10 @@ def test(q, bus, conn):
channels = e.args[0]
assert len(channels) == 3
+ # 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_text, got_tubes, got_tube = False, False, False
for path, props in channels:
if props[CHANNEL_TYPE] == CHANNEL_TYPE_TEXT:
@@ -334,6 +338,8 @@ def test(q, bus, conn):
assert props[INITIATOR_ID] == contact1_name
assert props[TARGET_ID] == muc2_name
+ assert (path, props) in all_channels, (path, props)
+
assert got_text
assert got_tubes
assert got_tube
@@ -390,6 +396,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 = 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:
@@ -416,6 +426,8 @@ def test(q, bus, conn):
assert props[INITIATOR_ID] == contact1_name
assert props[TARGET_ID] == muc2_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