[next] telepathy-rakia: NewChannels -> NewChannel
Guillaume Desmottes
gdesmott at kemper.freedesktop.org
Wed Jan 29 07:00:47 PST 2014
Module: telepathy-rakia
Branch: next
Commit: 9bea265dba3c2fa707933c15f06c2e892793b90a
URL: http://cgit.freedesktop.org/telepathy/telepathy-rakia/commit/?id=9bea265dba3c2fa707933c15f06c2e892793b90a
Author: Guillaume Desmottes <guillaume.desmottes at collabora.co.uk>
Date: Wed Jan 29 15:51:12 2014 +0100
NewChannels -> NewChannel
---
tests/twisted/test-debug.py | 4 ++--
tests/twisted/test-message.py | 4 ++--
tests/twisted/test-register-sasl.py | 4 ++--
tests/twisted/test-self-alias.py | 4 ++--
tests/twisted/text/initiate-requestotron.py | 13 +++++--------
tests/twisted/voip/calltest.py | 7 ++-----
6 files changed, 15 insertions(+), 21 deletions(-)
diff --git a/tests/twisted/test-debug.py b/tests/twisted/test-debug.py
index c8bec2c..46c8e5b 100644
--- a/tests/twisted/test-debug.py
+++ b/tests/twisted/test-debug.py
@@ -39,7 +39,7 @@ def test(q, bus, conn, stream):
cs.TARGET_HANDLE_TYPE: cs.HT_CONTACT,
cs.TARGET_HANDLE: self_handle })
- q.expect('dbus-signal', signal='NewChannels')
+ q.expect('dbus-signal', signal='NewChannel')
if DEBUGGING:
assert len(messages) > 0
@@ -61,7 +61,7 @@ def test(q, bus, conn, stream):
cs.TARGET_HANDLE_TYPE: cs.HT_CONTACT,
cs.TARGET_HANDLE: self_handle })
- q.expect('dbus-signal', signal='NewChannels')
+ q.expect('dbus-signal', signal='NewChannel')
assertEquals (snapshot, messages)
diff --git a/tests/twisted/test-message.py b/tests/twisted/test-message.py
index 208ed7c..b92eca6 100644
--- a/tests/twisted/test-message.py
+++ b/tests/twisted/test-message.py
@@ -16,8 +16,8 @@ import uuid
FROM_URL = 'sip:other.user at somewhere.else.com'
def test_new_channel(q, bus, conn, target_uri, initiator_uri, requested):
- event = q.expect('dbus-signal', signal='NewChannels')
- path, props = event.args[0][0]
+ event = q.expect('dbus-signal', signal='NewChannel')
+ path, props = event.args
assertEquals(cs.CHANNEL_TYPE_TEXT, props[cs.CHANNEL_TYPE])
assertEquals(cs.HT_CONTACT, props[cs.TARGET_HANDLE_TYPE])
handle = props[cs.TARGET_HANDLE]
diff --git a/tests/twisted/test-register-sasl.py b/tests/twisted/test-register-sasl.py
index 7678e52..b2efbda 100644
--- a/tests/twisted/test-register-sasl.py
+++ b/tests/twisted/test-register-sasl.py
@@ -14,8 +14,8 @@ def test(q, bus, conn, sip):
q.expect('sip-register')
- nc = q.expect('dbus-signal', signal='NewChannels')
- (((path, props),),) = nc.args
+ nc = q.expect('dbus-signal', signal='NewChannel')
+ path, props = nc.args
assertEquals(cs.CHANNEL_TYPE_SERVER_AUTHENTICATION, props[cs.CHANNEL_TYPE])
assertEquals(['X-TELEPATHY-PASSWORD'], props[cs.SASL_AVAILABLE_MECHANISMS])
diff --git a/tests/twisted/test-self-alias.py b/tests/twisted/test-self-alias.py
index 7ebff55..8604dab 100644
--- a/tests/twisted/test-self-alias.py
+++ b/tests/twisted/test-self-alias.py
@@ -33,8 +33,8 @@ def test(q, bus, conn, sip_proxy):
cs.TARGET_HANDLE_TYPE: cs.HT_CONTACT,
cs.TARGET_HANDLE: handle })
- event = q.expect('dbus-signal', signal='NewChannels')
- path, props = event.args[0][0]
+ event = q.expect('dbus-signal', signal='NewChannel')
+ path, props = event.args
text_iface = dbus.Interface(bus.get_object(conn.bus_name, path),
cs.CHANNEL_TYPE_TEXT)
diff --git a/tests/twisted/text/initiate-requestotron.py b/tests/twisted/text/initiate-requestotron.py
index e1fd66a..c0ab90c 100644
--- a/tests/twisted/text/initiate-requestotron.py
+++ b/tests/twisted/text/initiate-requestotron.py
@@ -35,7 +35,7 @@ def test(q, bus, conn, stream):
ret, new_sig = q.expect_many(
EventPattern('dbus-return', method='CreateChannel'),
- EventPattern('dbus-signal', signal='NewChannels'),
+ EventPattern('dbus-signal', signal='NewChannel'),
)
assert len(ret.value) == 2
@@ -48,16 +48,13 @@ def test(q, bus, conn, stream):
assertEquals(self_handle, emitted_props[cs.INITIATOR_HANDLE])
assertEquals(self_uri, emitted_props[cs.INITIATOR_ID])
- assert len(new_sig.args) == 1
- assert len(new_sig.args[0]) == 1 # one channel
- assert len(new_sig.args[0][0]) == 2 # two struct members
- assert new_sig.args[0][0][0] == ret.value[0]
- assert new_sig.args[0][0][1] == ret.value[1]
+ assert new_sig.args[0] == ret.value[0]
+ assert new_sig.args[1] == ret.value[1]
properties = conn.GetAll(cs.CONN_IFACE_REQUESTS, dbus_interface=cs.PROPERTIES_IFACE)
- assert new_sig.args[0][0] in properties['Channels'], \
- (new_sig.args[0][0], properties['Channels'])
+ assert (new_sig.args[0], new_sig.args[1]) in properties['Channels'], \
+ (new_sig.args, properties['Channels'])
conn.Disconnect()
q.expect('dbus-signal', signal='StatusChanged', args=[2, 1])
diff --git a/tests/twisted/voip/calltest.py b/tests/twisted/voip/calltest.py
index cb68a42..5a2bd85 100644
--- a/tests/twisted/voip/calltest.py
+++ b/tests/twisted/voip/calltest.py
@@ -249,12 +249,9 @@ class CallTest:
cs.CALL_INITIAL_VIDEO_NAME: self.initial_video_content_name or "",
})[0]
- nc = self.q.expect('dbus-signal', signal='NewChannels')
+ nc = self.q.expect('dbus-signal', signal='NewChannel')
- assertLength(1, nc.args)
- assertLength(1, nc.args[0]) # one channel
- assertLength(2, nc.args[0][0]) # two struct members
- self.chan_path, props = nc.args[0][0]
+ self.chan_path, props = nc.args
self.check_channel_props(props, True)
self.chan = wrap_channel(
More information about the telepathy-commits
mailing list