[telepathy-mission-control/master] capabilities/draft-2.py: exercise capability tokens
Simon McVittie
simon.mcvittie at collabora.co.uk
Fri Sep 11 11:17:24 PDT 2009
---
test/twisted/capabilities/draft-2.py | 19 +++++++++++++++++--
test/twisted/telepathy/clients/AbiWord.client | 4 ++++
2 files changed, 21 insertions(+), 2 deletions(-)
diff --git a/test/twisted/capabilities/draft-2.py b/test/twisted/capabilities/draft-2.py
index ee025d5..9c07458 100644
--- a/test/twisted/capabilities/draft-2.py
+++ b/test/twisted/capabilities/draft-2.py
@@ -59,8 +59,11 @@ def test(q, bus, mc):
cs.CHANNEL + '.ChannelType': cs.CHANNEL_TYPE_STREAMED_MEDIA,
}, signature='sv')
media_call = SimulatedClient(q, bus, 'MediaCall',
- observe=[], approve=[],
- handle=[media_fixed_properties], bypass_approval=False)
+ observe=[], approve=[], handle=[media_fixed_properties],
+ cap_tokens=[cs.CHANNEL_IFACE_MEDIA_SIGNALLING + '/ice-udp',
+ cs.CHANNEL_IFACE_MEDIA_SIGNALLING + '/audio/speex',
+ cs.CHANNEL_IFACE_MEDIA_SIGNALLING + '/video/theora'],
+ bypass_approval=False)
# wait for MC to download the properties
expect_client_setup(q, [media_call])
@@ -85,6 +88,18 @@ def test(q, bus, mc):
assert abi_contact_fixed_properties in filters[cs.CLIENT + '.AbiWord']
assert len(filters[cs.CLIENT + '.AbiWord']) == 2
+ assert len(tokens[cs.CLIENT + '.MediaCall']) == 3
+ assert cs.CHANNEL_IFACE_MEDIA_SIGNALLING + '/ice-udp' in \
+ tokens[cs.CLIENT + '.MediaCall']
+ assert cs.CHANNEL_IFACE_MEDIA_SIGNALLING + '/audio/speex' in \
+ tokens[cs.CLIENT + '.MediaCall']
+ assert cs.CHANNEL_IFACE_MEDIA_SIGNALLING + '/video/theora' in \
+ tokens[cs.CLIENT + '.MediaCall']
+
+ assert len(tokens[cs.CLIENT + '.AbiWord']) == 2
+ assert 'com.example.Foo' in tokens[cs.CLIENT + '.AbiWord']
+ assert 'com.example.Bar' in tokens[cs.CLIENT + '.AbiWord']
+
return True
params = dbus.Dictionary({"account": "someguy at example.com",
diff --git a/test/twisted/telepathy/clients/AbiWord.client b/test/twisted/telepathy/clients/AbiWord.client
index 4022f43..2ec8494 100644
--- a/test/twisted/telepathy/clients/AbiWord.client
+++ b/test/twisted/telepathy/clients/AbiWord.client
@@ -10,3 +10,7 @@ org.freedesktop.Telepathy.Channel.Type.StreamTube.Service s=x-abiword
org.freedesktop.Telepathy.Channel.ChannelType s=org.freedesktop.Telepathy.Channel.Type.StreamTube
org.freedesktop.Telepathy.Channel.TargetHandleType u=2
org.freedesktop.Telepathy.Channel.Type.StreamTube.Service s=x-abiword
+
+[org.freedesktop.Telepathy.Client.Handler.Capabilities]
+com.example.Foo=true
+com.example.Bar=true
--
1.5.6.5
More information about the telepathy-commits
mailing list