summaryrefslogtreecommitdiff
path: root/tests/twisted/jingle-share/test-caps-file-transfer.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/twisted/jingle-share/test-caps-file-transfer.py')
-rw-r--r--tests/twisted/jingle-share/test-caps-file-transfer.py20
1 files changed, 10 insertions, 10 deletions
diff --git a/tests/twisted/jingle-share/test-caps-file-transfer.py b/tests/twisted/jingle-share/test-caps-file-transfer.py
index 0bf869a1a..f3be084ed 100644
--- a/tests/twisted/jingle-share/test-caps-file-transfer.py
+++ b/tests/twisted/jingle-share/test-caps-file-transfer.py
@@ -2,15 +2,16 @@ import dbus
from twisted.words.xish import xpath
-from servicetest import (assertEquals, EventPattern)
-from gabbletest import exec_test, make_result_iq, sync_stream, make_presence
+from servicetest import EventPattern
+from gabbletest import exec_test
import constants as cs
-from caps_helper import compute_caps_hash, \
+from caps_helper import \
text_fixed_properties, text_allowed_properties, \
stream_tube_fixed_properties, stream_tube_allowed_properties, \
dbus_tube_fixed_properties, dbus_tube_allowed_properties, \
- ft_fixed_properties, ft_allowed_properties_with_metadata
+ ft_fixed_properties, ft_allowed_properties_with_metadata,\
+ get_contacts_capabilities_sync
import ns
from jingleshareutils import test_ft_caps_from_contact
@@ -43,7 +44,6 @@ generic_caps = [(text_fixed_properties, text_allowed_properties),
(dbus_tube_fixed_properties, dbus_tube_allowed_properties)]
def check_contact_caps(conn, handle, with_ft):
- conn_caps_iface = dbus.Interface(conn, cs.CONN_IFACE_CONTACT_CAPS)
conn_contacts_iface = dbus.Interface(conn, cs.CONN_IFACE_CONTACTS)
if with_ft:
@@ -51,7 +51,7 @@ def check_contact_caps(conn, handle, with_ft):
else:
expected_caps = dbus.Dictionary({handle: generic_caps})
- caps = conn_caps_iface.GetContactCapabilities([handle])
+ caps = get_contacts_capabilities_sync(conn, [handle])
assert caps == expected_caps, caps
# check the Contacts interface give the same caps
caps_via_contacts_iface = conn_contacts_iface.GetContactAttributes(
@@ -65,11 +65,11 @@ def test2(q, bus, connections, streams):
conn1, conn2 = connections
stream1, stream2 = streams
conn1_handle = conn1.Properties.Get(cs.CONN, 'SelfHandle')
- conn1_jid = conn1.InspectHandles(cs.HT_CONTACT, [conn1_handle])[0]
+ conn1_jid = conn1.inspect_contact_sync(conn1_handle)
conn2_handle = conn2.Properties.Get(cs.CONN, 'SelfHandle')
- conn2_jid = conn2.InspectHandles(cs.HT_CONTACT, [conn2_handle])[0]
- handle1 = conn2.RequestHandles(cs.HT_CONTACT, [conn1_jid])[0]
- handle2 = conn1.RequestHandles(cs.HT_CONTACT, [conn2_jid])[0]
+ conn2_jid = conn2.inspect_contact_sync(conn2_handle)
+ handle1 = conn2.get_contact_handle_sync(conn1_jid)
+ handle2 = conn1.get_contact_handle_sync(conn2_jid)
q.expect_many(EventPattern('dbus-signal',
signal='ContactCapabilitiesChanged',