summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorSjoerd Simons <sjoerd.simons@collabora.co.uk>2011-11-01 23:10:00 +0000
committerSjoerd Simons <sjoerd.simons@collabora.co.uk>2011-11-02 07:06:28 +0000
commita4c98cfc5f89e84628c7ebd4bcaeb431f986917a (patch)
treeef611ec459e8f92603c8561ecb12481154f236ed /tests
parent8e80e5fc190d6dc7654f835bdb0467c035a02fa3 (diff)
Support trailing parameter without a initial :
BIP doesn't start the trailing parameter with a : when it's only a single word in various cases. For example when sending the topic. Adjust our parser to accept trailing parameters not starting with : if it's the final word in the string
Diffstat (limited to 'tests')
-rw-r--r--tests/twisted/channels/muc-channel-topic.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/twisted/channels/muc-channel-topic.py b/tests/twisted/channels/muc-channel-topic.py
index 3f59146..6d84d18 100644
--- a/tests/twisted/channels/muc-channel-topic.py
+++ b/tests/twisted/channels/muc-channel-topic.py
@@ -122,6 +122,17 @@ def test(q, bus, conn, stream):
'Timestamp': 1234,
})
+ # BIP omits the : for the trailing parameter if it's a single word, make
+ # sure we pass that as well
+ stream.sendMessage('TOPIC', room, 'badgers!',
+ prefix='alice')
+ expect_subject_props_changed(q,
+ { 'Subject': 'badgers!',
+ 'Actor': 'alice',
+ 'ActorHandle': alice_handle,
+ 'Timestamp': 1234,
+ })
+
test_can_set(q, stream, channel)
# Topic is read/write, if we get ops it should stay that way