[telepathy-gabble/master] offer-muc-{dbus, stream}-tube.py: check if the channel is in Requests's Channels property

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


---
 tests/twisted/tubes/offer-muc-dbus-tube.py   |    5 +++++
 tests/twisted/tubes/offer-muc-stream-tube.py |    5 +++++
 2 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/tests/twisted/tubes/offer-muc-dbus-tube.py b/tests/twisted/tubes/offer-muc-dbus-tube.py
index 9a5b645..90918a8 100644
--- a/tests/twisted/tubes/offer-muc-dbus-tube.py
+++ b/tests/twisted/tubes/offer-muc-dbus-tube.py
@@ -231,6 +231,11 @@ def test(q, bus, conn, stream):
     assert prop[cs.TARGET_ID] == 'chat2 at conf.localhost'
     assert prop[cs.DBUS_TUBE_SERVICE_NAME] == 'com.example.TestCase'
 
+    # check that the tube channel is in the channels list
+    all_channels = conn.Get(cs.CONN_IFACE_REQUESTS, 'Channels',
+        dbus_interface=cs.PROPERTIES_IFACE, byte_arrays=True)
+    assert (path, prop) in all_channels
+
     tube_chan = bus.get_object(conn.bus_name, path)
     dbus_tube_iface = dbus.Interface(tube_chan, cs.CHANNEL_TYPE_DBUS_TUBE)
     chan_iface = dbus.Interface(tube_chan, cs.CHANNEL)
diff --git a/tests/twisted/tubes/offer-muc-stream-tube.py b/tests/twisted/tubes/offer-muc-stream-tube.py
index fb562cd..ec4b0ae 100644
--- a/tests/twisted/tubes/offer-muc-stream-tube.py
+++ b/tests/twisted/tubes/offer-muc-stream-tube.py
@@ -251,6 +251,11 @@ def test(q, bus, conn, stream, bytestream_cls):
     assert prop[cs.TARGET_ID] == 'chat2 at conf.localhost'
     assert prop[cs.STREAM_TUBE_SERVICE] == 'newecho'
 
+    # check that the tube channel is in the channels list
+    all_channels = conn.Get(cs.CONN_IFACE_REQUESTS, 'Channels',
+        dbus_interface=cs.PROPERTIES_IFACE, byte_arrays=True)
+    assert (path, prop) in all_channels
+
     tube_chan = bus.get_object(conn.bus_name, path)
     stream_tube_iface = dbus.Interface(tube_chan, cs.CHANNEL_TYPE_STREAM_TUBE)
     chan_iface = dbus.Interface(tube_chan, cs.CHANNEL)
-- 
1.5.6.5




More information about the telepathy-commits mailing list