summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon McVittie <simon.mcvittie@collabora.co.uk>2010-10-01 13:04:27 +0100
committerSimon McVittie <simon.mcvittie@collabora.co.uk>2010-10-01 14:15:06 +0100
commit5984be4092c3f390c1d8afccb1aeb2c435f6f15a (patch)
tree27b9ca060bdf74175ecb0bd47165cceb25a7f0e5
parenteb51a18a4fb73e65536b37132d8725d962483fb7 (diff)
test-muc-invite: make interface checking future-proof
The check for Interfaces has failed ever since Messages support was added. We could make much, much more use of constants and servicetest in this test, but making the tests pass is a higher priority for now.
-rw-r--r--tests/twisted/avahi/test-muc-invite.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/tests/twisted/avahi/test-muc-invite.py b/tests/twisted/avahi/test-muc-invite.py
index ef037176..09a6c52a 100644
--- a/tests/twisted/avahi/test-muc-invite.py
+++ b/tests/twisted/avahi/test-muc-invite.py
@@ -10,10 +10,12 @@ from avahitest import AvahiAnnouncer, AvahiListener
from avahitest import get_host_name
from xmppstream import setup_stream_listener, connect_to_stream
-from servicetest import make_channel_proxy
+from servicetest import (make_channel_proxy, assertEquals, assertContains)
from twisted.words.xish import domish
+import constants as cs
+
CONNECTION_INTERFACE_REQUESTS = 'org.freedesktop.Telepathy.Connection.Interface.Requests'
CHANNEL_INTERFACE ='org.freedesktop.Telepathy.Channel'
CHANNEL_TYPE_TEXT = 'org.freedesktop.Telepathy.Channel.Type.Text'
@@ -97,7 +99,8 @@ def test(q, bus, conn):
# check channel properties
# org.freedesktop.Telepathy.Channel D-Bus properties
assert props[CHANNEL_INTERFACE + '.ChannelType'] == CHANNEL_TYPE_TEXT
- assert props[CHANNEL_INTERFACE + '.Interfaces'] == [CHANNEL_IFACE_GROUP]
+ assertContains(cs.CHANNEL_IFACE_GROUP, props[cs.INTERFACES])
+ assertContains(cs.CHANNEL_IFACE_MESSAGES, props[cs.INTERFACES])
assert props[CHANNEL_INTERFACE + '.TargetHandle'] == muc_handle
assert props[CHANNEL_INTERFACE + '.TargetID'] == 'my-room'
assert props[CHANNEL_INTERFACE + '.TargetHandleType'] == HT_ROOM