From cc1429eb0e2e22e9e394677262e518e4106c5e55 Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Wed, 8 Jan 2014 15:59:34 +0000 Subject: [PATCH 3/3] tests: cope with Contacts being part of Connection now Also delete ContactAttributeInterfaces, which no longer exists. --- tests/twisted/account-manager/irc.py | 6 +++--- tests/twisted/account-manager/nickname.py | 2 +- tests/twisted/mctest.py | 24 ++---------------------- 3 files changed, 6 insertions(+), 26 deletions(-) diff --git a/tests/twisted/account-manager/irc.py b/tests/twisted/account-manager/irc.py index 0d0de71..a0504f6 100644 --- a/tests/twisted/account-manager/irc.py +++ b/tests/twisted/account-manager/irc.py @@ -51,7 +51,7 @@ def test(q, bus, mc): expect_after_connect = [ EventPattern('dbus-method-call', - interface=cs.CONN_IFACE_CONTACTS, + interface=cs.CONN, predicate=(lambda e: e.method in ( 'GetContactAttributes', 'GetContactByID' ) and @@ -88,7 +88,7 @@ def test(q, bus, mc): get_aliases, _ = q.expect_many( EventPattern('dbus-method-call', - interface=cs.CONN_IFACE_CONTACTS, + interface=cs.CONN, predicate=(lambda e: e.method in ( 'GetContactAttributes', 'GetContactByID' ) and @@ -127,7 +127,7 @@ def test(q, bus, mc): # In response to the self-handle change, we check our nickname again get_aliases, _ = q.expect_many( EventPattern('dbus-method-call', - interface=cs.CONN_IFACE_CONTACTS, + interface=cs.CONN, predicate=(lambda e: e.method in ( 'GetContactAttributes', 'GetContactByID' ) and diff --git a/tests/twisted/account-manager/nickname.py b/tests/twisted/account-manager/nickname.py index ddd511b..604e927 100644 --- a/tests/twisted/account-manager/nickname.py +++ b/tests/twisted/account-manager/nickname.py @@ -51,7 +51,7 @@ def test(q, bus, mc, nickname): # OK, let's go online expect_after_connect = [ EventPattern('dbus-method-call', - interface=cs.CONN_IFACE_CONTACTS, + interface=cs.CONN, predicate=(lambda e: e.method in ( 'GetContactAttributes', 'GetContactByID' ) and diff --git a/tests/twisted/mctest.py b/tests/twisted/mctest.py index 0be39f5..7521764 100644 --- a/tests/twisted/mctest.py +++ b/tests/twisted/mctest.py @@ -255,7 +255,6 @@ class SimulatedConnection(object): self.avatar_delayed = server_delays_avatar self.interfaces = [] - self.interfaces.append(cs.CONN_IFACE_CONTACTS) if self.has_aliasing: self.interfaces.append(cs.CONN_IFACE_ALIASING) @@ -296,18 +295,10 @@ class SimulatedConnection(object): q.add_dbus_method_impl(self.GetContactAttributes, path=self.object_path, - interface=cs.CONN_IFACE_CONTACTS, method='GetContactAttributes') + interface=cs.CONN, method='GetContactAttributes') q.add_dbus_method_impl(self.GetContactByID, path=self.object_path, - interface=cs.CONN_IFACE_CONTACTS, method='GetContactByID') - q.add_dbus_method_impl(self.Get_ContactAttributeInterfaces, - path=self.object_path, - interface=cs.PROPERTIES_IFACE, method='Get', - args=[cs.CONN_IFACE_CONTACTS, 'ContactAttributeInterfaces']) - q.add_dbus_method_impl(self.GetAll_Contacts, - path=self.object_path, - interface=cs.PROPERTIES_IFACE, method='GetAll', - args=[cs.CONN_IFACE_CONTACTS]) + interface=cs.CONN, method='GetContactByID') if has_presence: q.add_dbus_method_impl(self.SetPresence, path=self.object_path, @@ -589,17 +580,6 @@ class SimulatedConnection(object): self.q.dbus_return(e.message, h, self.get_contact_attributes(h, e.args[1]), signature='ua{sv}') - def GetAll_Contacts(self, e): - self.q.dbus_return(e.message, { - 'ContactAttributeInterfaces': - self.get_contact_attribute_interfaces(), - }, signature='a{sv}') - - def Get_ContactAttributeInterfaces(self, e): - self.q.dbus_return(e.message, - dbus.Array(self.get_contact_attribute_interfaces(), signature='s'), - signature='v') - class SimulatedChannel(object): def __init__(self, conn, immutable, mutable={}, destroyable=False, group=False): -- 1.8.5.2