[telepathy-gabble/telepathy-gabble-0.8] check that ListTubes() return tubes created using the new API

Guillaume Desmottes guillaume.desmottes at collabora.co.uk
Tue Sep 8 07:27:58 PDT 2009


---
 tests/twisted/tubes/offer-muc-dbus-tube.py |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/tests/twisted/tubes/offer-muc-dbus-tube.py b/tests/twisted/tubes/offer-muc-dbus-tube.py
index a06a004..8602bef 100644
--- a/tests/twisted/tubes/offer-muc-dbus-tube.py
+++ b/tests/twisted/tubes/offer-muc-dbus-tube.py
@@ -208,6 +208,9 @@ def test(q, bus, conn, stream, access_control):
             got_text = True
         elif props[cs.CHANNEL_TYPE] == cs.CHANNEL_TYPE_TUBES:
             got_tubes = True
+
+            tubes_iface = dbus.Interface(bus.get_object(conn.bus_name, path),
+                cs.CHANNEL_TYPE_TUBES)
         else:
             assert False
 
@@ -290,6 +293,9 @@ def test(q, bus, conn, stream, access_control):
     bob_bus_name = ':2.Ym9i'
     bob_handle = conn.RequestHandles(cs.HT_CONTACT, ['chat2 at conf.localhost/bob'])[0]
 
+    tubes = tubes_iface.ListTubes(byte_arrays=True)
+    assertEquals(1, len(tubes))
+
     # Bob joins the tube
     presence = elem('presence', from_='chat2 at conf.localhost/bob', to='chat2 at conf.localhost')(
         elem('x', xmlns=ns.MUC),
-- 
1.5.6.5




More information about the telepathy-commits mailing list