From efa15d6ca605f205317da7b986d0dac606a0cc57 Mon Sep 17 00:00:00 2001 From: Guillaume Desmottes Date: Wed, 9 Oct 2013 13:03:51 -0400 Subject: servicetest: add send_msg_sync() helper Will help the Messages transition. --- tests/twisted/servicetest.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/twisted/servicetest.py b/tests/twisted/servicetest.py index 1fe8b2cb7..8b33c05e4 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): -- cgit v1.2.3