diff options
author | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2009-07-28 13:40:10 +0100 |
---|---|---|
committer | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2009-07-28 13:40:10 +0100 |
commit | 1a355c17d268c8c24867969e4f8638d029836684 (patch) | |
tree | eb0c42fc547644e121cf4747dc9cf464628b53eb | |
parent | 32919ca2c229f3ff454c74aebcaad4e36e39f3cb (diff) |
capabilities/draft-1.py: assert that AdvertiseCapabilities is called first
This ensures that we don't cause regressions: Gabble's regression tests
only check the case where AdvertiseCapabilities comes first.
-rw-r--r-- | test/twisted/capabilities/draft-1.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/twisted/capabilities/draft-1.py b/test/twisted/capabilities/draft-1.py index c03f9af8..ad41e30c 100644 --- a/test/twisted/capabilities/draft-1.py +++ b/test/twisted/capabilities/draft-1.py @@ -52,6 +52,8 @@ def test(q, bus, mc): # wait for MC to download the properties expect_client_setup(q, [media_call]) + had = [] + def check_legacy_caps(e): # Because MC has no idea how to map Client capabilities into legacy # capabilities, it assumes that every client has all the flags in @@ -65,6 +67,7 @@ def test(q, bus, mc): assert len(add) == 2 assert len(remove) == 0 + had.append('legacy') return True def check_draft_1_caps(e): @@ -74,6 +77,7 @@ def test(q, bus, mc): assert abi_fixed_properties in aasv assert len(aasv) == 2 + had.append('draft-1') return True params = dbus.Dictionary({"account": "someguy@example.com", @@ -93,5 +97,10 @@ def test(q, bus, mc): predicate=check_legacy_caps), ]) + # MC currently calls AdvertiseCapabilities first, and changing this + # risks causing regressions (the test case in telepathy-gabble assumes + # this order). + assert had == ['legacy', 'draft-1'] + if __name__ == '__main__': exec_test(test, {}) |