[telepathy-mission-control/master] account-manager/recover-from-disconnect: assert that our custom status is preserved

Simon McVittie simon.mcvittie at collabora.co.uk
Wed Jun 3 10:41:39 PDT 2009


Until the previous commit, this test would fail, because our presence
would be left as (AVAILABLE, 'available', '') after reconnection.
---
 .../account-manager/recover-from-disconnect.py     |   14 ++++++++++++--
 1 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/test/twisted/account-manager/recover-from-disconnect.py b/test/twisted/account-manager/recover-from-disconnect.py
index c79d17b..290575a 100644
--- a/test/twisted/account-manager/recover-from-disconnect.py
+++ b/test/twisted/account-manager/recover-from-disconnect.py
@@ -42,7 +42,7 @@ def test(q, bus, mc):
             handled=False)
 
     conn = SimulatedConnection(q, bus, 'fakecm', 'fakeprotocol', '_',
-            'myself')
+            'myself', has_presence=True)
 
     q.dbus_return(e.message, conn.bus_name, conn.object_path, signature='so')
 
@@ -56,6 +56,11 @@ def test(q, bus, mc):
 
     q.expect_many(
             EventPattern('dbus-method-call',
+                interface=cs.CONN_IFACE_SIMPLE_PRESENCE,
+                method='SetPresence',
+                args=list(presence[1:]),
+                handled=True),
+            EventPattern('dbus-method-call',
                 interface=cs.PROPERTIES_IFACE, method='GetAll',
                 args=[cs.CONN_IFACE_REQUESTS],
                 path=conn.object_path, handled=True),
@@ -75,7 +80,7 @@ def test(q, bus, mc):
             handled=False)
 
     conn = SimulatedConnection(q, bus, 'fakecm', 'fakeprotocol', '_',
-            'myself')
+            'myself', has_presence=True)
 
     q.dbus_return(e.message, conn.bus_name, conn.object_path, signature='so')
 
@@ -89,6 +94,11 @@ def test(q, bus, mc):
 
     q.expect_many(
             EventPattern('dbus-method-call',
+                interface=cs.CONN_IFACE_SIMPLE_PRESENCE,
+                method='SetPresence',
+                args=list(presence[1:]),
+                handled=True),
+            EventPattern('dbus-method-call',
                 interface=cs.PROPERTIES_IFACE, method='GetAll',
                 args=[cs.CONN_IFACE_REQUESTS],
                 path=conn.object_path, handled=True),
-- 
1.5.6.5



More information about the telepathy-commits mailing list