[Telepathy-commits] [telepathy-gabble/master] vcard/test-muc-alias.py: use make_muc_presence
Guillaume Desmottes
guillaume.desmottes at collabora.co.uk
Thu Mar 12 04:13:52 PDT 2009
---
tests/twisted/vcard/test-muc-alias.py | 18 +++---------------
1 files changed, 3 insertions(+), 15 deletions(-)
diff --git a/tests/twisted/vcard/test-muc-alias.py b/tests/twisted/vcard/test-muc-alias.py
index 141cf4a..4ebe4f4 100644
--- a/tests/twisted/vcard/test-muc-alias.py
+++ b/tests/twisted/vcard/test-muc-alias.py
@@ -7,7 +7,7 @@ import dbus
from twisted.words.xish import domish
-from gabbletest import go, make_result_iq
+from gabbletest import go, make_result_iq, make_muc_presence
from servicetest import call_async, lazy, match, tp_name_prefix
def aliasing_iface(proxy):
@@ -48,22 +48,10 @@ def expect_members_changed1(event, data):
@match('stream-presence', to='chat at conf.localhost/test')
def expect_presence(event, data):
# Send presence for other member of room.
- presence = domish.Element((None, 'presence'))
- presence['from'] = 'chat at conf.localhost/bob'
- x = presence.addElement(('http://jabber.org/protocol/muc#user', 'x'))
- item = x.addElement('item')
- item['affiliation'] = 'owner'
- item['role'] = 'moderator'
- data['stream'].send(presence)
+ data['stream'].send(make_muc_presence('owner', 'moderator', 'chat at conf.localhost', 'bob'))
# 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'] = 'none'
- item['role'] = 'participant'
- data['stream'].send(presence)
+ data['stream'].send(make_muc_presence('none', 'participant', 'chat at conf.localhost', 'test'))
return True
@match('dbus-signal', signal='MembersChanged',
--
1.5.6.5
More information about the telepathy-commits
mailing list