[Pkg-telepathy-commits] [telepathy-mission-control-6] 69/280: SimulatedChannel: fill in extra immutable properties

Simon McVittie smcv at debian.org
Thu Mar 27 20:07:06 UTC 2014


This is an automated email from the git hooks/post-receive script.

smcv pushed a commit to branch debian
in repository telepathy-mission-control-6.

commit 9d27f8cc2127823c0084d8c221a5e6874a638b2c
Author: Simon McVittie <simon.mcvittie at collabora.co.uk>
Date:   Thu Oct 3 16:00:52 2013 +0100

    SimulatedChannel: fill in extra immutable properties
    
    Not all of our regression tests fill in all the necessary immutable
    properties for a modern TpChannel to prepare; some of them cut corners.
    Fill in the gaps.
    
    Bug: https://bugs.freedesktop.org/show_bug.cgi?id=54879
    Reviewed-by: Guillaume Desmottes <guillaume.desmottes at collabora.co.uk>
---
 tests/twisted/mctest.py | 19 +++++++++++++++++--
 1 file changed, 17 insertions(+), 2 deletions(-)

diff --git a/tests/twisted/mctest.py b/tests/twisted/mctest.py
index 3704eef..7e0350b 100644
--- a/tests/twisted/mctest.py
+++ b/tests/twisted/mctest.py
@@ -608,9 +608,24 @@ class SimulatedChannel(object):
         self.q = conn.q
         self.bus = conn.bus
         self.object_path = conn.object_path + ('/_%x' % id(self))
-        self.immutable = immutable
+        self.immutable = immutable.copy()
+
+        if self.immutable[cs.TARGET_HANDLE_TYPE] != cs.HT_NONE:
+            if (cs.TARGET_ID in self.immutable) != (
+                    cs.TARGET_HANDLE in self.immutable):
+                if cs.TARGET_ID in self.immutable:
+                    self.immutable[cs.TARGET_HANDLE] = conn.ensure_handle(
+                            self.immutable[cs.TARGET_HANDLE_TYPE],
+                            self.immutable[cs.TARGET_ID])
+                else:
+                    self.immutable[cs.TARGET_ID] = conn.inspect_handles(
+                            [self.immutable[cs.TARGET_HANDLE]])[0]
+
+        if cs.REQUESTED not in self.immutable:
+            self.immutable[cs.REQUESTED] = False
+
         self.properties = dbus.Dictionary({}, signature='sv')
-        self.properties.update(immutable)
+        self.properties.update(self.immutable)
         self.properties.update(mutable)
 
         self.q.add_dbus_method_impl(self.GetAll,

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-telepathy/telepathy-mission-control-6.git



More information about the Pkg-telepathy-commits mailing list