summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorJonny Lamb <jonny.lamb@collabora.co.uk>2012-05-15 14:47:22 +0100
committerJonny Lamb <jonny.lamb@collabora.co.uk>2012-05-15 14:48:45 +0100
commitae49f3ee466d8064fe33826233efa68d3e2fbb0a (patch)
treed8a30b6b3fb3bd9144cc5bbaf3b399d46f2cfa27 /tests
parent7456e007f33524239a49f412802aae2d44307849 (diff)
muc-channel: set configuration retrieved when appropriate
Signed-off-by: Jonny Lamb <jonny.lamb@collabora.co.uk>
Diffstat (limited to 'tests')
-rw-r--r--tests/twisted/messages/room-config.py19
1 files changed, 13 insertions, 6 deletions
diff --git a/tests/twisted/messages/room-config.py b/tests/twisted/messages/room-config.py
index 5837ee0..0b8043a 100644
--- a/tests/twisted/messages/room-config.py
+++ b/tests/twisted/messages/room-config.py
@@ -8,6 +8,10 @@ from servicetest import EventPattern, call_async, assertContains, assertEquals,
import constants as cs
import dbus
+def change_channel_mode(stream, mode_change):
+ stream.sendMessage('324', stream.nick, '#test', mode_change,
+ prefix='idle.test.server')
+
def setup(q, bus, conn, stream):
conn.Connect()
q.expect('dbus-signal', signal='StatusChanged',
@@ -19,12 +23,19 @@ def setup(q, bus, conn, stream):
cs.TARGET_HANDLE_TYPE: cs.HT_ROOM,
cs.TARGET_ID: '#test'})
- ret = q.expect('dbus-return', method='CreateChannel')
+ ret, _, _ = q.expect_many(EventPattern('dbus-return', method='CreateChannel'),
+ EventPattern('dbus-signal', signal='MembersChanged'),
+ EventPattern('stream-MODE', data=['#test']))
- q.expect('dbus-signal', signal='MembersChanged')
chan = wrap_channel(bus.get_object(conn.bus_name, ret.value[0]),
'Text', extra=['RoomConfig1'])
+ change_channel_mode(stream, '+n')
+
+ q.expect('dbus-signal', signal='PropertiesChanged',
+ args=[cs.CHANNEL_IFACE_ROOM_CONFIG,
+ {'ConfigurationRetrieved': True}, []])
+
sync_stream(q, stream)
return chan
@@ -216,10 +227,6 @@ def test_password(q, bus, conn, stream):
[]])
)
-def change_channel_mode(stream, mode_change):
- stream.sendMessage('324', stream.nick, '#test', mode_change,
- prefix='idle.test.server')
-
def test_modechanges(q, bus, conn, stream):
chan = setup(q, bus, conn, stream)