telepathy-gabble: servicetest: add send_msg_sync() helper
Guillaume Desmottes
gdesmott at kemper.freedesktop.org
Fri Oct 11 14:58:34 PDT 2013
Module: telepathy-gabble
Branch: master
Commit: efa15d6ca605f205317da7b986d0dac606a0cc57
URL: http://cgit.freedesktop.org/telepathy/telepathy-gabble/commit/?id=efa15d6ca605f205317da7b986d0dac606a0cc57
Author: Guillaume Desmottes <guillaume.desmottes at collabora.co.uk>
Date: Wed Oct 9 13:03:51 2013 -0400
servicetest: add send_msg_sync() helper
Will help the Messages transition.
---
tests/twisted/servicetest.py | 6 +++++-
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):
More information about the telepathy-commits
mailing list