summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
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)