summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2013-10-09 17:03:51 (GMT)
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2013-10-11 21:55:05 (GMT)
commitefa15d6ca605f205317da7b986d0dac606a0cc57 (patch)
tree4872cc45ae4955a482f32b92a4bc649d86ddc122
parentda29c7cb84870bdaac607c84e51b075224866fcb (diff)
downloadtelepathy-gabble-efa15d6ca605f205317da7b986d0dac606a0cc57.tar.gz
telepathy-gabble-efa15d6ca605f205317da7b986d0dac606a0cc57.tar.xz
servicetest: add send_msg_sync() helper
Will help the Messages transition.
-rw-r--r--tests/twisted/servicetest.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/twisted/servicetest.py b/tests/twisted/servicetest.py
index 1fe8b2c..8b33c05 100644
--- a/tests/twisted/servicetest.py
+++ b/tests/twisted/servicetest.py
@@ -643,6 +643,10 @@ def wrap_connection(conn):
('ClientTypes', cs.CONN_IFACE_CLIENT_TYPES),
]))
+class ChannelWrapper(ProxyWrapper):
+ def send_msg_sync(self, txt):
+ self.Text.Send(0, txt)
+
def wrap_channel(chan, type_, extra=None):
interfaces = {
type_: tp_name_prefix + '.Channel.Type.' + type_,
@@ -661,7 +665,7 @@ def wrap_channel(chan, type_, extra=None):
(name, tp_name_prefix + '.Channel.Interface.' + name)
for name in extra]))
- return ProxyWrapper(chan, tp_name_prefix + '.Channel', interfaces)
+ return ChannelWrapper(chan, tp_name_prefix + '.Channel', interfaces)
def wrap_content(chan, extra=None):