[telepathy-salut/master] fix tests now that new tube API has been undrafted
Guillaume Desmottes
guillaume.desmottes at collabora.co.uk
Fri Jun 26 07:16:31 PDT 2009
---
tests/twisted/avahi/test-caps-tubes.py | 36 ++++++++++----------
.../avahi/tubes/test-offer-private-stream-tube.py | 22 ++++++------
.../avahi/tubes/test-request-invalid-dbus-tube.py | 2 +-
.../avahi/tubes/test-two-muc-stream-tubes.py | 4 +-
.../avahi/tubes/test-two-private-stream-tubes.py | 4 +-
tests/twisted/constants.py | 6 ++--
6 files changed, 37 insertions(+), 37 deletions(-)
diff --git a/tests/twisted/avahi/test-caps-tubes.py b/tests/twisted/avahi/test-caps-tubes.py
index 693dc31..fc07e60 100644
--- a/tests/twisted/avahi/test-caps-tubes.py
+++ b/tests/twisted/avahi/test-caps-tubes.py
@@ -71,8 +71,8 @@ ft_allowed_properties = dbus.Array([
daap_fixed_properties = dbus.Dictionary({
'org.freedesktop.Telepathy.Channel.TargetHandleType': 1L,
'org.freedesktop.Telepathy.Channel.ChannelType':
- 'org.freedesktop.Telepathy.Channel.Type.StreamTube.DRAFT',
- 'org.freedesktop.Telepathy.Channel.Type.StreamTube.DRAFT.Service':
+ 'org.freedesktop.Telepathy.Channel.Type.StreamTube',
+ 'org.freedesktop.Telepathy.Channel.Type.StreamTube.Service':
'daap'
})
daap_allowed_properties = dbus.Array([
@@ -82,8 +82,8 @@ daap_allowed_properties = dbus.Array([
http_fixed_properties = dbus.Dictionary({
'org.freedesktop.Telepathy.Channel.TargetHandleType': 1L,
'org.freedesktop.Telepathy.Channel.ChannelType':
- 'org.freedesktop.Telepathy.Channel.Type.StreamTube.DRAFT',
- 'org.freedesktop.Telepathy.Channel.Type.StreamTube.DRAFT.Service':
+ 'org.freedesktop.Telepathy.Channel.Type.StreamTube',
+ 'org.freedesktop.Telepathy.Channel.Type.StreamTube.Service':
'http'
})
http_allowed_properties = dbus.Array([
@@ -93,8 +93,8 @@ http_allowed_properties = dbus.Array([
xiangqi_fixed_properties = dbus.Dictionary({
'org.freedesktop.Telepathy.Channel.TargetHandleType': 1L,
'org.freedesktop.Telepathy.Channel.ChannelType':
- 'org.freedesktop.Telepathy.Channel.Type.DBusTube.DRAFT',
- 'org.freedesktop.Telepathy.Channel.Type.DBusTube.DRAFT.ServiceName':
+ 'org.freedesktop.Telepathy.Channel.Type.DBusTube',
+ 'org.freedesktop.Telepathy.Channel.Type.DBusTube.ServiceName':
'com.example.Xiangqi'
})
xiangqi_allowed_properties = dbus.Array([
@@ -104,8 +104,8 @@ xiangqi_allowed_properties = dbus.Array([
go_fixed_properties = dbus.Dictionary({
'org.freedesktop.Telepathy.Channel.TargetHandleType': 1L,
'org.freedesktop.Telepathy.Channel.ChannelType':
- 'org.freedesktop.Telepathy.Channel.Type.DBusTube.DRAFT',
- 'org.freedesktop.Telepathy.Channel.Type.DBusTube.DRAFT.ServiceName':
+ 'org.freedesktop.Telepathy.Channel.Type.DBusTube',
+ 'org.freedesktop.Telepathy.Channel.Type.DBusTube.ServiceName':
'com.example.Go'
})
go_allowed_properties = dbus.Array([
@@ -279,7 +279,7 @@ def test_tube_caps_from_contact(q, bus, conn, service,
signaled_caps = event.args[0][contact_handle]
assert len(signaled_caps) == 2, signaled_caps # basic caps + daap
assert signaled_caps[1][0] \
- ['org.freedesktop.Telepathy.Channel.Type.StreamTube.DRAFT.Service'] \
+ ['org.freedesktop.Telepathy.Channel.Type.StreamTube.Service'] \
== 'daap'
# daap capabilities
@@ -321,7 +321,7 @@ def test_tube_caps_from_contact(q, bus, conn, service,
signaled_caps = event.args[0][contact_handle]
assert len(signaled_caps) == 2, signaled_caps # basic caps + Xiangqi
assert signaled_caps[1][0] \
- ['org.freedesktop.Telepathy.Channel.Type.DBusTube.DRAFT.ServiceName'] \
+ ['org.freedesktop.Telepathy.Channel.Type.DBusTube.ServiceName'] \
== 'com.example.Xiangqi'
# xiangqi capabilities
@@ -366,10 +366,10 @@ def test_tube_caps_from_contact(q, bus, conn, service,
signaled_caps = event.args[0][contact_handle]
assert len(signaled_caps) == 3, signaled_caps # basic caps + daap+xiangqi
assert signaled_caps[1][0] \
- ['org.freedesktop.Telepathy.Channel.Type.StreamTube.DRAFT.Service'] \
+ ['org.freedesktop.Telepathy.Channel.Type.StreamTube.Service'] \
== 'daap'
assert signaled_caps[2][0] \
- ['org.freedesktop.Telepathy.Channel.Type.DBusTube.DRAFT.ServiceName'] \
+ ['org.freedesktop.Telepathy.Channel.Type.DBusTube.ServiceName'] \
== 'com.example.Xiangqi'
# daap + xiangqi capabilities
@@ -419,16 +419,16 @@ def test_tube_caps_from_contact(q, bus, conn, service,
signaled_caps = event.args[0][contact_handle]
assert len(signaled_caps) == 5, signaled_caps # basic caps + 4 tubes
assert signaled_caps[1][0] \
- ['org.freedesktop.Telepathy.Channel.Type.StreamTube.DRAFT.Service'] \
+ ['org.freedesktop.Telepathy.Channel.Type.StreamTube.Service'] \
== 'daap'
assert signaled_caps[2][0] \
- ['org.freedesktop.Telepathy.Channel.Type.StreamTube.DRAFT.Service'] \
+ ['org.freedesktop.Telepathy.Channel.Type.StreamTube.Service'] \
== 'http'
assert signaled_caps[3][0] \
- ['org.freedesktop.Telepathy.Channel.Type.DBusTube.DRAFT.ServiceName'] \
+ ['org.freedesktop.Telepathy.Channel.Type.DBusTube.ServiceName'] \
== 'com.example.Xiangqi'
assert signaled_caps[4][0] \
- ['org.freedesktop.Telepathy.Channel.Type.DBusTube.DRAFT.ServiceName'] \
+ ['org.freedesktop.Telepathy.Channel.Type.DBusTube.ServiceName'] \
== 'com.example.Go'
# http + daap + xiangqi + go capabilities
@@ -462,10 +462,10 @@ def test_tube_caps_from_contact(q, bus, conn, service,
signaled_caps = event.args[0][contact_handle]
assert len(signaled_caps) == 3, signaled_caps # basic caps + daap+xiangqi
assert signaled_caps[1][0] \
- ['org.freedesktop.Telepathy.Channel.Type.StreamTube.DRAFT.Service'] \
+ ['org.freedesktop.Telepathy.Channel.Type.StreamTube.Service'] \
== 'daap'
assert signaled_caps[2][0] \
- ['org.freedesktop.Telepathy.Channel.Type.DBusTube.DRAFT.ServiceName'] \
+ ['org.freedesktop.Telepathy.Channel.Type.DBusTube.ServiceName'] \
== 'com.example.Xiangqi'
# daap + xiangqi capabilities
diff --git a/tests/twisted/avahi/tubes/test-offer-private-stream-tube.py b/tests/twisted/avahi/tubes/test-offer-private-stream-tube.py
index e9b748d..93fb011 100644
--- a/tests/twisted/avahi/tubes/test-offer-private-stream-tube.py
+++ b/tests/twisted/avahi/tubes/test-offer-private-stream-tube.py
@@ -58,12 +58,12 @@ def check_conn_properties(q, bus, conn, channel_list=None):
) in properties.get('RequestableChannelClasses'),\
properties['RequestableChannelClasses']
assert ({'org.freedesktop.Telepathy.Channel.ChannelType':
- 'org.freedesktop.Telepathy.Channel.Type.StreamTube.DRAFT',
+ 'org.freedesktop.Telepathy.Channel.Type.StreamTube',
'org.freedesktop.Telepathy.Channel.TargetHandleType': HT_CONTACT,
},
['org.freedesktop.Telepathy.Channel.TargetHandle',
'org.freedesktop.Telepathy.Channel.TargetID',
- 'org.freedesktop.Telepathy.Channel.Type.StreamTube.DRAFT.Service',
+ 'org.freedesktop.Telepathy.Channel.Type.StreamTube.Service',
]
) in properties.get('RequestableChannelClasses'),\
properties['RequestableChannelClasses']
@@ -93,7 +93,7 @@ def check_channel_properties(q, bus, conn, channel, channel_type,
else:
assert state is not None
tube_props = channel.GetAll(
- 'org.freedesktop.Telepathy.Channel.Interface.Tube.DRAFT',
+ 'org.freedesktop.Telepathy.Channel.Interface.Tube',
dbus_interface='org.freedesktop.DBus.Properties')
assert tube_props['State'] == state, tube_props['State']
# no strict check but at least check the properties exist
@@ -228,7 +228,7 @@ def test(q, bus, conn):
try:
requestotron.CreateChannel(
{'org.freedesktop.Telepathy.Channel.ChannelType':
- 'org.freedesktop.Telepathy.Channel.Type.StreamTube.DRAFT',
+ 'org.freedesktop.Telepathy.Channel.Type.StreamTube',
'org.freedesktop.Telepathy.Channel.TargetHandleType':
HT_CONTACT,
'org.freedesktop.Telepathy.Channel.TargetHandle':
@@ -249,7 +249,7 @@ def test(q, bus, conn):
try:
requestotron.CreateChannel(
{'org.freedesktop.Telepathy.Channel.ChannelType':
- 'org.freedesktop.Telepathy.Channel.Type.StreamTube.DRAFT',
+ 'org.freedesktop.Telepathy.Channel.Type.StreamTube',
'org.freedesktop.Telepathy.Channel.TargetHandleType':
HT_CONTACT,
'org.freedesktop.Telepathy.Channel.TargetHandle':
@@ -267,12 +267,12 @@ def test(q, bus, conn):
# Salut must succeed
call_async(q, requestotron, 'CreateChannel',
{'org.freedesktop.Telepathy.Channel.ChannelType':
- 'org.freedesktop.Telepathy.Channel.Type.StreamTube.DRAFT',
+ 'org.freedesktop.Telepathy.Channel.Type.StreamTube',
'org.freedesktop.Telepathy.Channel.TargetHandleType':
HT_CONTACT,
'org.freedesktop.Telepathy.Channel.TargetHandle':
handle,
- 'org.freedesktop.Telepathy.Channel.Type.StreamTube.DRAFT.Service':
+ 'org.freedesktop.Telepathy.Channel.Type.StreamTube.Service':
"newecho"
});
ret, old_sig, new_sig = q.expect_many(
@@ -295,9 +295,9 @@ def test(q, bus, conn):
check_conn_properties(q, bus, conn,
[old_tubes_channel_properties, stream_tube_channel_properties])
- assert stream_tube_channel_properties[1]['org.freedesktop.Telepathy.Channel.Type.StreamTube.DRAFT.Service'] == \
+ assert stream_tube_channel_properties[1]['org.freedesktop.Telepathy.Channel.Type.StreamTube.Service'] == \
'newecho'
- assert stream_tube_channel_properties[1]['org.freedesktop.Telepathy.Channel.Type.StreamTube.DRAFT.SupportedSocketTypes'] == \
+ assert stream_tube_channel_properties[1]['org.freedesktop.Telepathy.Channel.Type.StreamTube.SupportedSocketTypes'] == \
{SOCKET_ADDRESS_TYPE_UNIX: [SOCKET_ACCESS_CONTROL_LOCALHOST],
SOCKET_ADDRESS_TYPE_IPV4: [SOCKET_ACCESS_CONTROL_LOCALHOST],
SOCKET_ADDRESS_TYPE_IPV6: [SOCKET_ACCESS_CONTROL_LOCALHOST]}
@@ -305,10 +305,10 @@ def test(q, bus, conn):
# continue
tubes_channel = make_channel_proxy(conn, chan_path, "Channel.Type.Tubes")
tube_channel = make_channel_proxy(conn, new_chan_path,
- "Channel.Type.StreamTube.DRAFT")
+ "Channel.Type.StreamTube")
check_channel_properties(q, bus, conn, tubes_channel, "Tubes", handle,
contact_name)
- check_channel_properties(q, bus, conn, tube_channel, "StreamTube.DRAFT",
+ check_channel_properties(q, bus, conn, tube_channel, "StreamTube",
handle, contact_name, 3)
tube_channel.Offer(SOCKET_ADDRESS_TYPE_UNIX, dbus.ByteArray(server_socket_address),
diff --git a/tests/twisted/avahi/tubes/test-request-invalid-dbus-tube.py b/tests/twisted/avahi/tubes/test-request-invalid-dbus-tube.py
index b84cc29..3e8338e 100644
--- a/tests/twisted/avahi/tubes/test-request-invalid-dbus-tube.py
+++ b/tests/twisted/avahi/tubes/test-request-invalid-dbus-tube.py
@@ -24,7 +24,7 @@ raise SystemExit(77)
PUBLISHED_NAME="test-tube"
CHANNEL_TYPE_TUBES = "org.freedesktop.Telepathy.Channel.Type.Tubes"
-C_T_DTUBE = 'org.freedesktop.Telepathy.Channel.Type.DBusTube.DRAFT'
+C_T_DTUBE = 'org.freedesktop.Telepathy.Channel.Type.DBusTube'
HT_CONTACT = 1
invalid_service_names = [ 'invalidServiceName'
diff --git a/tests/twisted/avahi/tubes/test-two-muc-stream-tubes.py b/tests/twisted/avahi/tubes/test-two-muc-stream-tubes.py
index 19e729c..bd064d3 100644
--- a/tests/twisted/avahi/tubes/test-two-muc-stream-tubes.py
+++ b/tests/twisted/avahi/tubes/test-two-muc-stream-tubes.py
@@ -328,7 +328,7 @@ def test(q, bus, conn):
contact1_tube = bus.get_object(conn.bus_name, path)
contact1_stream_tube = make_channel_proxy(conn, path,
- "Channel.Type.StreamTube.DRAFT")
+ "Channel.Type.StreamTube")
contact1_tube_channel = make_channel_proxy(conn, path, "Channel")
tube1_path = path
else:
@@ -416,7 +416,7 @@ def test(q, bus, conn):
contact2_tube = bus.get_object(conn.bus_name, path)
contact2_stream_tube = make_channel_proxy(conn, path,
- "Channel.Type.StreamTube.DRAFT")
+ "Channel.Type.StreamTube")
contact2_tube_channel = make_channel_proxy(conn, path, "Channel")
tube2_path = path
else:
diff --git a/tests/twisted/avahi/tubes/test-two-private-stream-tubes.py b/tests/twisted/avahi/tubes/test-two-private-stream-tubes.py
index 72f0763..6fa63e7 100644
--- a/tests/twisted/avahi/tubes/test-two-private-stream-tubes.py
+++ b/tests/twisted/avahi/tubes/test-two-private-stream-tubes.py
@@ -242,7 +242,7 @@ def test(q, bus, conn):
assert props[STREAM_TUBE_SERVICE] == 'test'
contact1_tube = bus.get_object(conn.bus_name, path)
- contact1_stream_tube = make_channel_proxy(conn, path, "Channel.Type.StreamTube.DRAFT")
+ contact1_stream_tube = make_channel_proxy(conn, path, "Channel.Type.StreamTube")
contact1_tube_channel = make_channel_proxy(conn, path, "Channel")
tube1_path = path
else:
@@ -293,7 +293,7 @@ def test(q, bus, conn):
assert props[STREAM_TUBE_SERVICE] == 'test'
contact2_tube = bus.get_object(conn.bus_name, path)
- contact2_stream_tube = make_channel_proxy(conn, path, "Channel.Type.StreamTube.DRAFT")
+ contact2_stream_tube = make_channel_proxy(conn, path, "Channel.Type.StreamTube")
contact2_tube_channel = make_channel_proxy(conn, path, "Channel")
tube2_path = path
else:
diff --git a/tests/twisted/constants.py b/tests/twisted/constants.py
index a0ada26..3b61aaf 100644
--- a/tests/twisted/constants.py
+++ b/tests/twisted/constants.py
@@ -20,13 +20,13 @@ CHANNEL_IFACE_HOLD = CHANNEL + ".Interface.Hold"
CHANNEL_IFACE_MEDIA_SIGNALLING = CHANNEL + ".Interface.MediaSignalling"
CHANNEL_IFACE_MESSAGES = CHANNEL + ".Interface.Messages"
CHANNEL_IFACE_PASSWORD = CHANNEL + ".Interface.Password"
-CHANNEL_IFACE_TUBE = CHANNEL + ".Interface.Tube.DRAFT"
+CHANNEL_IFACE_TUBE = CHANNEL + ".Interface.Tube"
CHANNEL_TYPE_CONTACT_LIST = CHANNEL + ".Type.ContactList"
CHANNEL_TYPE_TEXT = CHANNEL + ".Type.Text"
CHANNEL_TYPE_TUBES = CHANNEL + ".Type.Tubes"
-CHANNEL_TYPE_STREAM_TUBE = CHANNEL + ".Type.StreamTube.DRAFT"
-CHANNEL_TYPE_DBUS_TUBE = CHANNEL + ".Type.DBusTube.DRAFT"
+CHANNEL_TYPE_STREAM_TUBE = CHANNEL + ".Type.StreamTube"
+CHANNEL_TYPE_DBUS_TUBE = CHANNEL + ".Type.DBusTube"
CHANNEL_TYPE_STREAMED_MEDIA = CHANNEL + ".Type.StreamedMedia"
CHANNEL_TYPE_TEXT = CHANNEL + ".Type.Text"
CHANNEL_TYPE_FILE_TRANSFER = CHANNEL + ".Type.FileTransfer"
--
1.5.6.5
More information about the telepathy-commits
mailing list