[Telepathy-commits] [telepathy-gabble/master] olpc-muc-invitation.py: check if act_prop_iface.GetProperties returns the right properties

Guillaume Desmottes guillaume.desmottes at collabora.co.uk
Mon Sep 29 07:53:50 PDT 2008


---
 tests/twisted/olpc/olpc-muc-invitation.py |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/tests/twisted/olpc/olpc-muc-invitation.py b/tests/twisted/olpc/olpc-muc-invitation.py
index acfa863..2ea191d 100644
--- a/tests/twisted/olpc/olpc-muc-invitation.py
+++ b/tests/twisted/olpc/olpc-muc-invitation.py
@@ -18,6 +18,7 @@ def test(q, bus, conn, stream):
     handles['bob'] = conn.RequestHandles(1, ['bob at localhost'])[0]
 
     buddy_iface = dbus.Interface(conn, 'org.laptop.Telepathy.BuddyInfo')
+    act_prop_iface = dbus.Interface(conn, 'org.laptop.Telepathy.ActivityProperties')
     call_async(q, buddy_iface, 'GetActivities', handles['bob'])
 
     event = q.expect('stream-iq', iq_type='get', to='bob at localhost')
@@ -60,6 +61,9 @@ def test(q, bus, conn, stream):
     assert len(acts) == 1
     assert acts[0] == ('foo_id', handles['chat'])
 
+    props = act_prop_iface.GetProperties(handles['chat'])
+    assert props == {'color': '#ffff00,#00ffff', 'private' : True}
+
     # Bobs invites us to the activity
     message = domish.Element((None, 'message'))
     message['from'] = 'chat at conf.localhost'
@@ -98,7 +102,6 @@ def test(q, bus, conn, stream):
     assert handles['chat_self'] == local_pending[0]
 
     # by now, we should have picked up the extra activity properties
-    buddy_iface = dbus.Interface(conn, 'org.laptop.Telepathy.BuddyInfo')
     call_async(q, buddy_iface, 'GetActivities', handles['bob'])
 
     event = q.expect('stream-iq', iq_type='get', to='bob at localhost')
@@ -145,7 +148,6 @@ def test(q, bus, conn, stream):
     stream.send(event.stanza)
 
     q.expect('dbus-return', method='SetActivities')
-    act_prop_iface = dbus.Interface(conn, 'org.laptop.Telepathy.ActivityProperties')
     call_async(q, act_prop_iface, 'SetProperties',
         handles['chat'], {'color': '#ffff00,#00ffff', 'private': True})
 
-- 
1.5.6.5




More information about the Telepathy-commits mailing list