[telepathy-gabble/master] check value of the SupportedAccessControls property

Guillaume Desmottes guillaume.desmottes at collabora.co.uk
Mon May 25 10:44:20 PDT 2009


---
 tests/twisted/constants.py                      |    1 +
 tests/twisted/tubes/accept-muc-dbus-tube.py     |    1 +
 tests/twisted/tubes/accept-private-dbus-tube.py |    1 +
 tests/twisted/tubes/offer-muc-dbus-tube.py      |    1 +
 tests/twisted/tubes/offer-private-dbus-tube.py  |    1 +
 5 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/tests/twisted/constants.py b/tests/twisted/constants.py
index 4a4c0d8..a0ada26 100644
--- a/tests/twisted/constants.py
+++ b/tests/twisted/constants.py
@@ -74,6 +74,7 @@ TUBE_STATE = CHANNEL_IFACE_TUBE + '.State'
 STREAM_TUBE_SERVICE = CHANNEL_TYPE_STREAM_TUBE + '.Service'
 DBUS_TUBE_SERVICE_NAME = CHANNEL_TYPE_DBUS_TUBE + '.ServiceName'
 DBUS_TUBE_DBUS_NAMES = CHANNEL_TYPE_DBUS_TUBE + '.DBusNames'
+DBUS_TUBE_SUPPORTED_ACCESS_CONTROLS = CHANNEL_TYPE_DBUS_TUBE + '.SupportedAccessControls'
 
 TUBE_CHANNEL_STATE_LOCAL_PENDING = 0
 TUBE_CHANNEL_STATE_REMOTE_PENDING = 1
diff --git a/tests/twisted/tubes/accept-muc-dbus-tube.py b/tests/twisted/tubes/accept-muc-dbus-tube.py
index 12e119f..96579fa 100644
--- a/tests/twisted/tubes/accept-muc-dbus-tube.py
+++ b/tests/twisted/tubes/accept-muc-dbus-tube.py
@@ -59,6 +59,7 @@ def test(q, bus, conn, stream):
     assert props[c.TARGET_ID] == 'chat at conf.localhost'
     assert props[c.DBUS_TUBE_SERVICE_NAME] == 'com.example.Test'
     assert props[c.TUBE_PARAMETERS] == {'foo': 'bar'}
+    assert props[c.DBUS_TUBE_SUPPORTED_ACCESS_CONTROLS] == [c.SOCKET_ACCESS_CONTROL_CREDENTIALS]
 
     tube_chan = bus.get_object(conn.bus_name, path)
     tube_iface = dbus.Interface(tube_chan, c.CHANNEL_IFACE_TUBE)
diff --git a/tests/twisted/tubes/accept-private-dbus-tube.py b/tests/twisted/tubes/accept-private-dbus-tube.py
index 26dd718..4601aa6 100644
--- a/tests/twisted/tubes/accept-private-dbus-tube.py
+++ b/tests/twisted/tubes/accept-private-dbus-tube.py
@@ -150,6 +150,7 @@ def test(q, bus, conn, stream, bytestream_cls):
     assert props[cs.TARGET_ID] == 'bob at localhost'
     assert props[cs.DBUS_TUBE_SERVICE_NAME] == 'com.example.TestCase2'
     assert props[cs.TUBE_PARAMETERS] == {'login': 'TEST'}
+    assert props[cs.DBUS_TUBE_SUPPORTED_ACCESS_CONTROLS] == [cs.SOCKET_ACCESS_CONTROL_CREDENTIALS]
     assert cs.TUBE_STATE not in props
 
     tube_chan = bus.get_object(conn.bus_name, path)
diff --git a/tests/twisted/tubes/offer-muc-dbus-tube.py b/tests/twisted/tubes/offer-muc-dbus-tube.py
index 6c3263b..f58dd89 100644
--- a/tests/twisted/tubes/offer-muc-dbus-tube.py
+++ b/tests/twisted/tubes/offer-muc-dbus-tube.py
@@ -230,6 +230,7 @@ def test(q, bus, conn, stream):
     assert prop[cs.TARGET_HANDLE_TYPE] == cs.HT_ROOM
     assert prop[cs.TARGET_ID] == 'chat2 at conf.localhost'
     assert prop[cs.DBUS_TUBE_SERVICE_NAME] == 'com.example.TestCase'
+    assert prop[cs.DBUS_TUBE_SUPPORTED_ACCESS_CONTROLS] == [cs.SOCKET_ACCESS_CONTROL_CREDENTIALS]
 
     # check that the tube channel is in the channels list
     all_channels = conn.Get(cs.CONN_IFACE_REQUESTS, 'Channels',
diff --git a/tests/twisted/tubes/offer-private-dbus-tube.py b/tests/twisted/tubes/offer-private-dbus-tube.py
index c0fb265..fb0c21e 100644
--- a/tests/twisted/tubes/offer-private-dbus-tube.py
+++ b/tests/twisted/tubes/offer-private-dbus-tube.py
@@ -189,6 +189,7 @@ def offer_new_dbus_tube(q, bus, conn, stream, self_handle, alice_handle, bytestr
     assert tube_props[cs.INITIATOR_HANDLE] == self_handle
     assert tube_props[cs.INITIATOR_ID] == "test at localhost"
     assert tube_props[cs.DBUS_TUBE_SERVICE_NAME] == 'com.example.TestCase'
+    assert tube_props[cs.DBUS_TUBE_SUPPORTED_ACCESS_CONTROLS] == [cs.SOCKET_ACCESS_CONTROL_CREDENTIALS]
     assert cs.DBUS_TUBE_DBUS_NAMES not in tube_props
     assert cs.TUBE_PARAMETERS not in tube_props
     assert cs.TUBE_STATE not in tube_props
-- 
1.5.6.5



More information about the telepathy-commits mailing list