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

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


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

diff --git a/tests/twisted/muc/test-muc-invitation.py b/tests/twisted/muc/test-muc-invitation.py
index b521aa2..7fd5cf3 100644
--- a/tests/twisted/muc/test-muc-invitation.py
+++ b/tests/twisted/muc/test-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
 
 def test(q, bus, conn, stream):
@@ -87,13 +87,7 @@ def test(q, bus, conn, stream):
             [room_self_handle], 0, room_self_handle]
 
     # Send presence for own membership of room.
-    presence = domish.Element((None, 'presence'))
-    presence['from'] = 'chat at conf.localhost/test'
-    x = presence.addElement(('http://jabber.org/protocol/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 == ['', [room_self_handle], [], [], [], 0, 0]
-- 
1.5.6.5




More information about the telepathy-commits mailing list