diff options
author | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2012-09-07 15:22:30 +0100 |
---|---|---|
committer | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2012-09-11 11:21:52 +0100 |
commit | 8a6e9461f9cc12788532441bcc6f43fa7df4913f (patch) | |
tree | a8ef9fe60441819febfab9aff72f1898a7eb5893 | |
parent | da14b4e86d503b30054b10b5e7b00eae7ba1add5 (diff) |
Verify that every caps 'ext' we ever advertise can be disco'd without error
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=54634
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Reviewed-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk>
-rw-r--r-- | tests/twisted/caps/trust-thyself.py | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/tests/twisted/caps/trust-thyself.py b/tests/twisted/caps/trust-thyself.py index 310fb4f82..34a145b62 100644 --- a/tests/twisted/caps/trust-thyself.py +++ b/tests/twisted/caps/trust-thyself.py @@ -60,18 +60,21 @@ def test(q, bus, conn, stream): c_ = xpath.queryForNodes('/presence/c', self_presence.stanza)[0] assertNotEquals(c['ver'], c_['ver']) - # But then someone asks us for our old caps - iq = IQ(stream, 'get') - iq['from'] = jid - query = iq.addElement((ns.DISCO_INFO, 'query')) - query['node'] = c['node'] + '#' + c['ver'] - stream.send(iq) + for suffix in [c['ver'], 'voice-v1', 'video-v1', 'camera-v1', 'share-v1', + 'pmuc-v1'] + list(c_['ext'].split()): + # But then someone asks us for our old caps + iq = IQ(stream, 'get') + iq['from'] = jid + query = iq.addElement((ns.DISCO_INFO, 'query')) + query['node'] = c['node'] + '#' + suffix + stream.send(iq) - # Gabble should still know what they are, and reply. This is actually quite - # important: there's a bug in iChat where if you return an error to a disco - # query, it just asks again, and again, and again... - reply = q.expect('stream-iq', to=jid) - assertEquals('result', reply.iq_type) + # Gabble should still know what they are, and reply. This is + # actually quite important: there's a bug in iChat where if you + # return an error to a disco query, it just asks again, and again, + # and again... + reply = q.expect('stream-iq', to=jid) + assertEquals('result', reply.iq_type) if __name__ == '__main__': exec_test(test) |