From cc57a8a5138386ba7658d46dd7f0b46e2533c7c1 Mon Sep 17 00:00:00 2001 From: Guillaume Desmottes Date: Tue, 17 Sep 2013 15:23:05 +0200 Subject: protocol: fix 'ConnectionInterfaces' Return the set of interfaces actually supported for this specific protocol rather than claiming to support everything. https://bugs.freedesktop.org/show_bug.cgi?id=69466 --- tests/twisted/cm/protocols.py | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'tests') diff --git a/tests/twisted/cm/protocols.py b/tests/twisted/cm/protocols.py index 4dc3f19..d296710 100644 --- a/tests/twisted/cm/protocols.py +++ b/tests/twisted/cm/protocols.py @@ -94,6 +94,10 @@ def test(q, bus, conn, stream): protocol_iface.IdentifyAccount({ 'account': 'smcv', 'server': 'irc.debian.org'})) + + assertDoesNotContain(cs.CONN_IFACE_AVATARS, flat_props['ConnectionInterfaces']) + assertDoesNotContain(cs.CONN_IFACE_CONTACT_BLOCKING, flat_props['ConnectionInterfaces']) + assertDoesNotContain(cs.CONN_IFACE_MAIL_NOTIFICATION + '.DRAFT', flat_props['ConnectionInterfaces']) elif name == 'myspace': assertEquals('x-myspace', flat_props['VCardField']) assertEquals('im-myspace', flat_props['Icon']) @@ -139,6 +143,10 @@ def test(q, bus, conn, stream): 'embrace-and-extend': r'WORKGROUP\Bill', 'password': 'letmein'}) q.expect('dbus-error', name=cs.INVALID_ARGUMENT) + + assertContains(cs.CONN_IFACE_AVATARS, flat_props['ConnectionInterfaces']) + assertContains(cs.CONN_IFACE_CONTACT_BLOCKING, flat_props['ConnectionInterfaces']) + assertContains(cs.CONN_IFACE_MAIL_NOTIFICATION + '.DRAFT', flat_props['ConnectionInterfaces']) elif name == 'qq': assertEquals('x-qq', flat_props['VCardField']) assertEquals('im-qq', flat_props['Icon']) -- cgit v1.2.1