[Telepathy-commits] [telepathy-gabble/master] text/initiate-requestotron.py: assert that the Channels and RequestableChannelClasses properties work correctly
Simon McVittie
simon.mcvittie at collabora.co.uk
Mon Nov 3 11:20:49 PST 2008
20080730183511-53eee-71d9f011f1abc53d195bb0b2f27213b35d93550e.gz
---
tests/twisted/text/initiate-requestotron.py | 20 ++++++++++++++++++++
1 files changed, 20 insertions(+), 0 deletions(-)
diff --git a/tests/twisted/text/initiate-requestotron.py b/tests/twisted/text/initiate-requestotron.py
index fa6ad13..11818bc 100644
--- a/tests/twisted/text/initiate-requestotron.py
+++ b/tests/twisted/text/initiate-requestotron.py
@@ -21,6 +21,19 @@ def test(q, bus, conn, stream):
event = q.expect('dbus-return', method='RequestHandles')
foo_handle = event.value[0][0]
+ properties = conn.GetAll(
+ 'org.freedesktop.Telepathy.Connection.Interface.Requests.DRAFT',
+ dbus_interface='org.freedesktop.DBus.Properties')
+ assert properties.get('Channels') == [], properties['Channels']
+ assert ({'org.freedesktop.Telepathy.Channel.ChannelType':
+ 'org.freedesktop.Telepathy.Channel.Type.Text',
+ 'org.freedesktop.Telepathy.Channel.TargetHandleType': 1,
+ },
+ ['org.freedesktop.Telepathy.Channel.TargetHandle'],
+ []
+ ) in properties.get('RequestableChannelClasses'),\
+ properties['RequestableChannelClasses']
+
requestotron = dbus.Interface(conn,
'org.freedesktop.Telepathy.Connection.Interface.Requests.DRAFT')
call_async(q, requestotron, 'CreateChannel',
@@ -66,6 +79,13 @@ def test(q, bus, conn, stream):
assert new_sig.args[0][0][0] == ret.value[0]
assert new_sig.args[0][0][1] == ret.value[1]
+ properties = conn.GetAll(
+ 'org.freedesktop.Telepathy.Connection.Interface.Requests.DRAFT',
+ dbus_interface='org.freedesktop.DBus.Properties')
+
+ assert new_sig.args[0][0] in properties['Channels'], \
+ (new_sig.args[0][0], properties['Channels'])
+
conn.Disconnect()
q.expect('dbus-signal', signal='StatusChanged', args=[2, 1])
--
1.5.6.5
More information about the Telepathy-commits
mailing list