[next] telepathy-gabble: tests: use Connection core instead of Contacts

Simon McVittie smcv at kemper.freedesktop.org
Mon Jan 13 05:10:37 PST 2014


Module: telepathy-gabble
Branch: next
Commit: 618be0a7f7d9eae3a892e866accb12cef9550ed2
URL:    http://cgit.freedesktop.org/telepathy/telepathy-gabble/commit/?id=618be0a7f7d9eae3a892e866accb12cef9550ed2

Author: Simon McVittie <simon.mcvittie at collabora.co.uk>
Date:   Thu Nov  7 15:16:49 2013 +0000

tests: use Connection core instead of Contacts

To make this patch less intrusive, I kept conn.Contacts working, but
made it just an alias for the default interface.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=50093
Reviewed-by: Guillaume Desmottes <guillaume.desmottes at collabora.co.uk>

---

 tests/twisted/constants.py                             |    1 -
 tests/twisted/file-transfer/test-caps-file-transfer.py |    2 +-
 tests/twisted/jingle-share/jingleshareutils.py         |    2 +-
 tests/twisted/jingle-share/test-caps-file-transfer.py  |    2 +-
 tests/twisted/servicetest.py                           |    2 +-
 5 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/tests/twisted/constants.py b/tests/twisted/constants.py
index 8b428fa..a624ab0 100644
--- a/tests/twisted/constants.py
+++ b/tests/twisted/constants.py
@@ -186,7 +186,6 @@ CONTACT_LIST_STATE_SUCCESS = 3
 CONN = PREFIX + ".Connection"
 CONN_IFACE_AVATARS = CONN + '.Interface.Avatars1'
 CONN_IFACE_ALIASING = CONN + '.Interface.Aliasing1'
-CONN_IFACE_CONTACTS = CONN + '.Interface.Contacts'
 CONN_IFACE_CONTACT_CAPS = CONN + '.Interface.ContactCapabilities1'
 CONN_IFACE_CONTACT_INFO = CONN + ".Interface.ContactInfo1"
 CONN_IFACE_PRESENCE = CONN + '.Interface.Presence1'
diff --git a/tests/twisted/file-transfer/test-caps-file-transfer.py b/tests/twisted/file-transfer/test-caps-file-transfer.py
index da90a1e..03b1349 100644
--- a/tests/twisted/file-transfer/test-caps-file-transfer.py
+++ b/tests/twisted/file-transfer/test-caps-file-transfer.py
@@ -20,7 +20,7 @@ if not FILE_TRANSFER_ENABLED:
 def test_ft_caps_from_contact(q, bus, conn, stream, contact, contact_handle, client):
 
     conn_caps_iface = dbus.Interface(conn, cs.CONN_IFACE_CONTACT_CAPS)
-    conn_contacts_iface = dbus.Interface(conn, cs.CONN_IFACE_CONTACTS)
+    conn_contacts_iface = dbus.Interface(conn, cs.CONN)
 
     # send presence with no FT cap
     presence = make_presence(contact, status='hello')
diff --git a/tests/twisted/jingle-share/jingleshareutils.py b/tests/twisted/jingle-share/jingleshareutils.py
index 9e32a36..67a6dd4 100644
--- a/tests/twisted/jingle-share/jingleshareutils.py
+++ b/tests/twisted/jingle-share/jingleshareutils.py
@@ -19,7 +19,7 @@ def test_ft_caps_from_contact(q, bus, conn, stream, contact, contact_handle, cli
     run += 1
 
     conn_caps_iface = dbus.Interface(conn, cs.CONN_IFACE_CONTACT_CAPS)
-    conn_contacts_iface = dbus.Interface(conn, cs.CONN_IFACE_CONTACTS)
+    conn_contacts_iface = dbus.Interface(conn, cs.CONN)
 
     # send presence with no FT cap
     presence = make_presence(contact, status='hello')
diff --git a/tests/twisted/jingle-share/test-caps-file-transfer.py b/tests/twisted/jingle-share/test-caps-file-transfer.py
index 0a8b7f3..f52ec2a 100644
--- a/tests/twisted/jingle-share/test-caps-file-transfer.py
+++ b/tests/twisted/jingle-share/test-caps-file-transfer.py
@@ -44,7 +44,7 @@ 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_contacts_iface = dbus.Interface(conn, cs.CONN_IFACE_CONTACTS)
+    conn_contacts_iface = dbus.Interface(conn, cs.CONN)
 
     if with_ft:
         expected_caps = dbus.Dictionary({handle: generic_ft_caps})
diff --git a/tests/twisted/servicetest.py b/tests/twisted/servicetest.py
index ba69d7f..4ee6e4f 100644
--- a/tests/twisted/servicetest.py
+++ b/tests/twisted/servicetest.py
@@ -626,9 +626,9 @@ def wrap_connection(conn):
     return ConnWrapper(conn, tp_name_prefix + '.Connection',
         dict(
         [('Peer', 'org.freedesktop.DBus.Peer'),
+         ('Contacts', cs.CONN),
          ('Aliasing', cs.CONN_IFACE_ALIASING),
          ('Avatars', cs.CONN_IFACE_AVATARS),
-         ('Contacts', cs.CONN_IFACE_CONTACTS),
          ('ContactCapabilities', cs.CONN_IFACE_CONTACT_CAPS),
          ('ContactInfo', cs.CONN_IFACE_CONTACT_INFO),
          ('Location', cs.CONN_IFACE_LOCATION),



More information about the telepathy-commits mailing list