diff options
author | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2010-09-01 18:44:12 +0100 |
---|---|---|
committer | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2010-09-01 18:44:12 +0100 |
commit | 2f01e1b22d33048ff4ad7b9792dfecf1a3bbb286 (patch) | |
tree | fb140a1abb8a253ddf3ff6e89eee9e1c8bec4ac5 /tests/twisted/roster | |
parent | 32d6aceb6515c19e40b8574252e98dc87e72a000 (diff) |
roster/test-roster-subscribe.py: expect RequestSubscription to return
Diffstat (limited to 'tests/twisted/roster')
-rw-r--r-- | tests/twisted/roster/test-roster-subscribe.py | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/tests/twisted/roster/test-roster-subscribe.py b/tests/twisted/roster/test-roster-subscribe.py index 8bdf7462d..1d0da3566 100644 --- a/tests/twisted/roster/test-roster-subscribe.py +++ b/tests/twisted/roster/test-roster-subscribe.py @@ -60,11 +60,15 @@ def test(q, bus, conn, stream, modern=True): acknowledge_iq(stream, event.stanza) - # FIXME: also expect RequestSubscription to finish; in principle, it should - # only finish after we ack that IQ, although at the moment it finishes - # sooner + expectations = [ + EventPattern('stream-presence', presence_type='subscribe'), + ] - event = q.expect('stream-presence', presence_type='subscribe') + if modern: + expectations.append(EventPattern('dbus-return', + method='RequestSubscription')) + + event = q.expect_many(*expectations)[0] presence = domish.Element(('jabber:client', 'presence')) presence['from'] = 'bob@foo.com' |