[telepathy-mission-control/master] dispatcher/dispatch-text.py: retrieve DispatchOperations property before testing

Simon McVittie simon.mcvittie at collabora.co.uk
Fri Apr 3 05:14:41 PDT 2009


Alberto suggests that there should be some "opt-in" process for
DispatchOperations change notification signals, and this seems the least
bad one.
---
 test/twisted/dispatcher/dispatch-text.py |   10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/test/twisted/dispatcher/dispatch-text.py b/test/twisted/dispatcher/dispatch-text.py
index 0a9578b..1b306bc 100644
--- a/test/twisted/dispatcher/dispatch-text.py
+++ b/test/twisted/dispatcher/dispatch-text.py
@@ -66,6 +66,13 @@ def test(q, bus, mc):
                 path=kopete.object_path),
             )
 
+    # subscribe to the OperationList interface (MC assumes that until this
+    # property has been retrieved once, nobody cares)
+
+    cd = bus.get_object(cs.CD_BUS_NAME, cs.CD_PATH)
+    cd_props = dbus.Interface(cd, cs.PROPERTIES_IFACE)
+    assert cd_props.Get(cs.CD_IFACE_OP_LIST, 'DispatchOperations') == []
+
     channel_properties = dbus.Dictionary(text_fixed_properties,
             signature='sv')
     channel_properties[cs.CHANNEL + '.TargetID'] = 'juliet'
@@ -102,9 +109,6 @@ def test(q, bus, mc):
     assert cdo_properties[cs.CDO + '.Channels'] == [(chan.object_path,
         channel_properties)]
 
-    cd = bus.get_object(cs.CD_BUS_NAME, cs.CD_PATH)
-    cd_props = dbus.Interface(cd, cs.PROPERTIES_IFACE)
-
     assert cs.CD_IFACE_OP_LIST in cd_props.Get(cs.CD, 'Interfaces')
     assert cd_props.Get(cs.CD_IFACE_OP_LIST, 'DispatchOperations') ==\
             [(cdo_path, cdo_properties)]
-- 
1.5.6.5




More information about the telepathy-commits mailing list