[Telepathy-commits] [telepathy-gabble/master] olpc/olpc-muc-invitation.py: use make_muc_presence

Guillaume Desmottes guillaume.desmottes at collabora.co.uk
Thu Mar 12 04:14:58 PDT 2009


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

diff --git a/tests/twisted/olpc/olpc-muc-invitation.py b/tests/twisted/olpc/olpc-muc-invitation.py
index 84d1767..d7b5e23 100644
--- a/tests/twisted/olpc/olpc-muc-invitation.py
+++ b/tests/twisted/olpc/olpc-muc-invitation.py
@@ -6,7 +6,7 @@ import dbus
 
 from twisted.words.xish import domish, xpath
 
-from gabbletest import go, make_result_iq, exec_test
+from gabbletest import go, make_result_iq, exec_test, make_muc_presence
 from servicetest import call_async, EventPattern
 import ns
 
@@ -129,13 +129,7 @@ def test(q, bus, conn, stream):
             [handles['chat_self']], 0, handles['chat_self']]
 
     # Send presence for own membership of room.
-    presence = domish.Element((None, 'presence'))
-    presence['from'] = 'chat at conf.localhost/test'
-    x = presence.addElement((ns.MUC_USER, 'x'))
-    item = x.addElement('item')
-    item['affiliation'] = 'owner'
-    item['role'] = 'moderator'
-    stream.send(presence)
+    stream.send(make_muc_presence('owner', 'moderator', 'chat at conf.localhost', 'test'))
 
     event = q.expect('dbus-signal', signal='MembersChanged')
     assert event.args == ['', [handles['chat_self']], [], [], [], 0, 0]
-- 
1.5.6.5




More information about the telepathy-commits mailing list