[Telepathy-commits] [telepathy-mission-control/master] test-connect.py: Check that Connect() is called

Alban Crequy alban.crequy at collabora.co.uk
Thu Nov 13 07:25:30 PST 2008


---
 test/twisted/fakecm.py       |    5 +++--
 test/twisted/test-connect.py |    4 ++++
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/test/twisted/fakecm.py b/test/twisted/fakecm.py
index d15a274..ad3038f 100644
--- a/test/twisted/fakecm.py
+++ b/test/twisted/fakecm.py
@@ -17,8 +17,9 @@ class FakeConn(dbus.service.Object):
 
     @dbus.service.method(dbus_interface=conn_iface,
                          in_signature='', out_signature='')
-    def Connect(self, protocol):
-        self.q.append(Event('dbus-method-call', name="Connect", obj=self))
+    def Connect(self):
+        self.q.append(Event('dbus-method-call', name="Connect", obj=self,
+                    path=self.object_path))
         return None
 
 class FakeCM(dbus.service.Object):
diff --git a/test/twisted/test-connect.py b/test/twisted/test-connect.py
index 13cd40c..fe4c34c 100644
--- a/test/twisted/test-connect.py
+++ b/test/twisted/test-connect.py
@@ -69,8 +69,12 @@ def test(q, bus, mc):
 
     e = q.expect('dbus-method-call', name='RequestConnection',
             protocol='fakeprotocol')
+    conn_object_path = e.conn.object_path
     assert e.parameters == params
 
+    e = q.expect('dbus-method-call', name='Connect',
+            path=conn_object_path)
+
     # Check the requested presence is online
     properties = account.GetAll(
             'org.freedesktop.Telepathy.Account',
-- 
1.5.6.5



More information about the Telepathy-commits mailing list