diff options
author | Andre Moreira Magalhaes (andrunko) <andre.magalhaes@collabora.co.uk> | 2011-12-20 21:40:36 -0200 |
---|---|---|
committer | Andre Moreira Magalhaes (andrunko) <andre.magalhaes@collabora.co.uk> | 2011-12-20 21:56:55 -0200 |
commit | e1524fd2acb29611f8e9055e227b86c4809b546f (patch) | |
tree | 848573f17f817f8c93efe509f04fd3940142f0c8 /tests/twisted/caps | |
parent | 109ae37c08613b9d1b240ab325f993d466a9be55 (diff) |
Add configure option to disable file transfer support.
Diffstat (limited to 'tests/twisted/caps')
-rw-r--r-- | tests/twisted/caps/advertise-contact-caps.py | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/tests/twisted/caps/advertise-contact-caps.py b/tests/twisted/caps/advertise-contact-caps.py index 8affe93b2..a70239e51 100644 --- a/tests/twisted/caps/advertise-contact-caps.py +++ b/tests/twisted/caps/advertise-contact-caps.py @@ -13,6 +13,8 @@ from caps_helper import caps_contain, receive_presence_and_ask_caps, \ import constants as cs import ns +from config import FILE_TRANSFER_ENABLED + def noop_presence_update(q, stream): # At the moment Gabble does not optimize away presence updates that # have no effect. When it does, we can forbid those events here. @@ -199,15 +201,16 @@ def run_test(q, bus, conn, stream, check_caps(namespaces, []) # Support file transfer - conn.ContactCapabilities.UpdateCapabilities([ - (cs.CLIENT + '.FileReceiver', [{ - cs.CHANNEL_TYPE: cs.CHANNEL_TYPE_FILE_TRANSFER, - cs.TARGET_HANDLE_TYPE: cs.HT_CONTACT, - }], []), - ]) - (disco_response, namespaces, _, _) = receive_presence_and_ask_caps(q, stream, - False) - check_caps(namespaces, [ns.FILE_TRANSFER]) + if FILE_TRANSFER_ENABLED: + conn.ContactCapabilities.UpdateCapabilities([ + (cs.CLIENT + '.FileReceiver', [{ + cs.CHANNEL_TYPE: cs.CHANNEL_TYPE_FILE_TRANSFER, + cs.TARGET_HANDLE_TYPE: cs.HT_CONTACT, + }], []), + ]) + (disco_response, namespaces, _, _) = receive_presence_and_ask_caps(q, stream, + False) + check_caps(namespaces, [ns.FILE_TRANSFER]) def run_mixed_test (q, bus, conn, stream): conn.Connect() |