[telepathy-mission-control/master] dispatch-obsolete: loosen assertion about AddDispatchOperation's channel properties
Simon McVittie
simon.mcvittie at collabora.co.uk
Mon Oct 19 16:03:47 PDT 2009
Previously, we asserted that we got the complete set of immutable
properties here, but I suspect that this was only by winning a race.
Instead, assert that we get a subset, including at least those that were
in the NewChannel signal.
---
test/twisted/dispatcher/dispatch-obsolete.py | 11 ++++++++++-
1 files changed, 10 insertions(+), 1 deletions(-)
diff --git a/test/twisted/dispatcher/dispatch-obsolete.py b/test/twisted/dispatcher/dispatch-obsolete.py
index b74970c..1de5727 100644
--- a/test/twisted/dispatcher/dispatch-obsolete.py
+++ b/test/twisted/dispatcher/dispatch-obsolete.py
@@ -146,7 +146,16 @@ def test(q, bus, mc):
handled=False),
)
- assert e.args == [channels, cdo_path, cdo_properties]
+ assert e.args[1:] == [cdo_path, cdo_properties]
+ channels = e.args[0]
+ assert len(channels) == 1, channels
+ assert channels[0][0] == chan.object_path, channels
+ # the announced channel properties are some subset of what it actually has
+ for key in channels[0][1]:
+ assert channel_properties[key] == channels[0][1][key], key
+ assert cs.CHANNEL + '.TargetHandleType' in channels[0][1]
+ assert cs.CHANNEL + '.ChannelType' in channels[0][1]
+ assert cs.CHANNEL + '.TargetHandle' in channels[0][1]
assert k.args == e.args
q.dbus_return(e.message, signature='')
--
1.5.6.5
More information about the telepathy-commits
mailing list