summaryrefslogtreecommitdiff
path: root/tests/twisted
diff options
context:
space:
mode:
authorJonny Lamb <jonny.lamb@collabora.co.uk>2011-10-27 17:41:31 +0100
committerJonny Lamb <jonny.lamb@collabora.co.uk>2011-10-28 18:46:32 +0100
commitedce1ee89f449e31beeca18c47e6fde48add43d6 (patch)
treeeceb1a2a936e06614f0ef80a617a49c727a746bd /tests/twisted
parent430514bccb385ebfed07618d9e6dce3764aeddda (diff)
downloadtelepathy-salut-edce1ee89f449e31beeca18c47e6fde48add43d6.tar.gz
ft-manager: only advertise Metadata support for those who support it
Signed-off-by: Jonny Lamb <jonny.lamb@collabora.co.uk>
Diffstat (limited to 'tests/twisted')
-rw-r--r--tests/twisted/avahi/caps-file-transfer.py5
-rw-r--r--tests/twisted/caps_helper.py5
2 files changed, 6 insertions, 4 deletions
diff --git a/tests/twisted/avahi/caps-file-transfer.py b/tests/twisted/avahi/caps-file-transfer.py
index 3d39a403..4a630d16 100644
--- a/tests/twisted/avahi/caps-file-transfer.py
+++ b/tests/twisted/avahi/caps-file-transfer.py
@@ -30,10 +30,11 @@ import ns
from constants import *
from caps_helper import compute_caps_hash, ft_fixed_properties, \
- ft_allowed_properties, text_fixed_properties, text_allowed_properties
+ ft_allowed_properties, ft_allowed_properties_with_metadata
from config import PACKAGE_STRING
ft_caps = (ft_fixed_properties, ft_allowed_properties)
+ft_metadata_caps = (ft_fixed_properties, ft_allowed_properties_with_metadata)
# last value of the "ver" key we resolved. We use it to be sure that the
# modified caps has already be announced.
@@ -229,7 +230,7 @@ def test(q, bus, conn):
self_handle = conn.GetSelfHandle()
conn_caps_iface = dbus.Interface(conn, CONN_IFACE_CONTACT_CAPS)
caps = conn_caps_iface.GetContactCapabilities([self_handle])[self_handle]
- assertContains(ft_caps, caps)
+ assertContains(ft_metadata_caps, caps)
client = 'http://telepathy.freedesktop.org/fake-client'
test_ft_caps_from_contact(q, bus, conn, client)
diff --git a/tests/twisted/caps_helper.py b/tests/twisted/caps_helper.py
index 14e7753a..e320124a 100644
--- a/tests/twisted/caps_helper.py
+++ b/tests/twisted/caps_helper.py
@@ -125,9 +125,10 @@ ft_allowed_properties = dbus.Array([
cs.CHANNEL_TYPE_FILE_TRANSFER + '.Description',
cs.CHANNEL_TYPE_FILE_TRANSFER + '.Date',
cs.CHANNEL_TYPE_FILE_TRANSFER + '.InitialOffset',
- cs.FT_URI,
+ cs.FT_URI])
+ft_allowed_properties_with_metadata = ft_allowed_properties + [
cs.FT_SERVICE_NAME,
- cs.FT_METADATA])
+ cs.FT_METADATA]
fake_client_dataforms = {
'urn:xmpp:dataforms:softwareinfo':