summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorSimon McVittie <simon.mcvittie@collabora.co.uk>2013-01-04 16:26:04 +0000
committerSimon McVittie <simon.mcvittie@collabora.co.uk>2013-01-04 16:26:04 +0000
commit58aefe4ef8d5d1194725f340e353de853b21bef6 (patch)
tree50f6ecba34d68a7cbd0a6ca3f0a729ef7d35b91a /tests
parentc9779d896a77f96f8aa582113984ba722ff65eb0 (diff)
downloadtelepathy-salut-58aefe4ef8d5d1194725f340e353de853b21bef6.tar.gz
Don't use sealed struct members
This exposes a bug in the tests: several tests assumed that tubes' Interfaces would always come out in the same order, but the new APIs we're using break that assumption. Fix that too.
Diffstat (limited to 'tests')
-rw-r--r--tests/twisted/avahi/tubes/two-muc-dbus-tubes.py11
-rw-r--r--tests/twisted/avahi/tubes/two-muc-stream-tubes.py11
2 files changed, 12 insertions, 10 deletions
diff --git a/tests/twisted/avahi/tubes/two-muc-dbus-tubes.py b/tests/twisted/avahi/tubes/two-muc-dbus-tubes.py
index c34a8e2e..c47026cc 100644
--- a/tests/twisted/avahi/tubes/two-muc-dbus-tubes.py
+++ b/tests/twisted/avahi/tubes/two-muc-dbus-tubes.py
@@ -2,7 +2,8 @@ from saluttest import exec_test
import dbus
from dbus.service import method, signal, Object
-from servicetest import wrap_channel, call_async, EventPattern, Event
+from servicetest import (wrap_channel, call_async, EventPattern, Event,
+ assertSameSets)
import constants as cs
import tubetestutil as t
@@ -81,8 +82,8 @@ def test(q, bus, conn):
assert props[cs.CHANNEL_TYPE] == cs.CHANNEL_TYPE_DBUS_TUBE
assert props[cs.REQUESTED] == True
- assert props[cs.INTERFACES] == [cs.CHANNEL_IFACE_GROUP,
- cs.CHANNEL_IFACE_TUBE]
+ assertSameSets([cs.CHANNEL_IFACE_GROUP, cs.CHANNEL_IFACE_TUBE],
+ props[cs.INTERFACES])
assert props[cs.DBUS_TUBE_SERVICE_NAME] == 'com.example.TestCase'
assert props[cs.DBUS_TUBE_SUPPORTED_ACCESS_CONTROLS] == [
cs.SOCKET_ACCESS_CONTROL_CREDENTIALS, cs.SOCKET_ACCESS_CONTROL_LOCALHOST]
@@ -128,8 +129,8 @@ def test(q, bus, conn):
assert props[cs.CHANNEL_TYPE] == cs.CHANNEL_TYPE_DBUS_TUBE
assert props[cs.REQUESTED] == False
- assert props[cs.INTERFACES] == [cs.CHANNEL_IFACE_GROUP,
- cs.CHANNEL_IFACE_TUBE]
+ assertSameSets([cs.CHANNEL_IFACE_GROUP, cs.CHANNEL_IFACE_TUBE],
+ props[cs.INTERFACES])
assert props[cs.TUBE_PARAMETERS] == sample_parameters
assert props[cs.DBUS_TUBE_SERVICE_NAME] == 'com.example.TestCase'
assert props[cs.DBUS_TUBE_SUPPORTED_ACCESS_CONTROLS] == [
diff --git a/tests/twisted/avahi/tubes/two-muc-stream-tubes.py b/tests/twisted/avahi/tubes/two-muc-stream-tubes.py
index 82696335..71dfcd52 100644
--- a/tests/twisted/avahi/tubes/two-muc-stream-tubes.py
+++ b/tests/twisted/avahi/tubes/two-muc-stream-tubes.py
@@ -5,7 +5,8 @@ import errno
import string
import tempfile
-from servicetest import wrap_channel, Event, call_async, EventPattern
+from servicetest import (wrap_channel, Event, call_async, EventPattern,
+ assertSameSets)
from twisted.internet.protocol import Factory, Protocol, ClientCreator
from twisted.internet import reactor
@@ -91,8 +92,8 @@ def test(q, bus, conn):
path, props = channels[0]
assert props[CHANNEL_TYPE] == CHANNEL_TYPE_STREAM_TUBE
assert props[REQUESTED] == True
- assert props[INTERFACES] == [CHANNEL_IFACE_GROUP,
- CHANNEL_IFACE_TUBE]
+ assertSameSets([CHANNEL_IFACE_GROUP, CHANNEL_IFACE_TUBE],
+ props[INTERFACES])
assert props[STREAM_TUBE_SERVICE] == 'test'
assert props[INITIATOR_HANDLE] == conn1_self_handle
assert props[INITIATOR_ID] == contact1_name
@@ -139,8 +140,8 @@ def test(q, bus, conn):
path, props = channels[0]
assert props[REQUESTED] == False
- assert props[INTERFACES] == [CHANNEL_IFACE_GROUP,
- CHANNEL_IFACE_TUBE]
+ assertSameSets([CHANNEL_IFACE_GROUP, CHANNEL_IFACE_TUBE],
+ props[INTERFACES])
assert props[STREAM_TUBE_SERVICE] == 'test'
assert props[TUBE_PARAMETERS] == sample_parameters