[Telepathy-commits] [telepathy-gabble/master] accept-muc-dbus-tube: use make_muc_presence
Guillaume Desmottes
guillaume.desmottes at collabora.co.uk
Thu Mar 12 03:50:17 PDT 2009
---
tests/twisted/tubes/accept-muc-dbus-tube.py | 9 ++-------
1 files changed, 2 insertions(+), 7 deletions(-)
diff --git a/tests/twisted/tubes/accept-muc-dbus-tube.py b/tests/twisted/tubes/accept-muc-dbus-tube.py
index f939407..b39f747 100644
--- a/tests/twisted/tubes/accept-muc-dbus-tube.py
+++ b/tests/twisted/tubes/accept-muc-dbus-tube.py
@@ -1,7 +1,7 @@
import dbus
from servicetest import call_async, EventPattern
-from gabbletest import exec_test, acknowledge_iq
+from gabbletest import exec_test, acknowledge_iq, make_muc_presence
import constants as c
from twisted.words.xish import domish, xpath
@@ -25,12 +25,7 @@ def test(q, bus, conn, stream):
# Bob offers a stream tube
bob_bus_name = ':2.Ym9i'
- 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'
+ presence = make_muc_presence('owner', 'moderator', 'chat at conf.localhost', 'bob')
tubes = presence.addElement((ns.TUBES, 'tubes'))
tube = tubes.addElement((None, 'tube'))
tube['type'] = 'dbus'
--
1.5.6.5
More information about the telepathy-commits
mailing list