[telepathy-mission-control/master] account-manager/create-with-properties.py: test more properties
Simon McVittie
simon.mcvittie at collabora.co.uk
Mon May 4 09:29:35 PDT 2009
RequestedPresence turns out not to work, so it's been missed out for now.
---
.../account-manager/create-with-properties.py | 35 ++++++++++++++++++--
1 files changed, 32 insertions(+), 3 deletions(-)
diff --git a/test/twisted/account-manager/create-with-properties.py b/test/twisted/account-manager/create-with-properties.py
index b42ebbc..c1004a1 100644
--- a/test/twisted/account-manager/create-with-properties.py
+++ b/test/twisted/account-manager/create-with-properties.py
@@ -44,6 +44,16 @@ def test(q, bus, mc):
cs.ACCOUNT + '.AutomaticPresence': dbus.Struct((
dbus.UInt32(cs.PRESENCE_TYPE_BUSY),
'busy', 'Exploding'), signature='uss'),
+ cs.ACCOUNT + '.Icon': 'quake3arena',
+ cs.ACCOUNT + '.Nickname': 'AnArKi',
+ cs.ACCOUNT + '.ConnectAutomatically': True,
+ cs.ACCOUNT_IFACE_AVATAR + '.Avatar': (dbus.ByteArray('foo'),
+ 'image/jpeg'),
+ cs.ACCOUNT_IFACE_NOKIA_COMPAT + '.Profile': 'openarena',
+ cs.ACCOUNT_IFACE_NOKIA_COMPAT + '.SecondaryVCardFields':
+ dbus.Array(['x-ioquake3', 'x-quake3'], signature='s'),
+ cs.ACCOUNT_IFACE_NOKIA_CONDITIONS + '.Condition':
+ dbus.Dictionary({ 'has-quad-damage': ':y' }, signature='ss'),
}, signature='sv')
call_async(q, creation_iface, 'CreateAccount',
@@ -80,9 +90,28 @@ def test(q, bus, mc):
assert properties.get('AutomaticPresence') == (cs.PRESENCE_TYPE_BUSY,
'busy', 'Exploding'), \
properties.get('AutomaticPresence')
-
- # FIXME: doing the same thing with RequestedPresence doesn't work
-
+ assert properties.get('ConnectAutomatically') == True, \
+ properties.get('ConnectAutomatically')
+ assert properties.get('Enabled') == True, \
+ properties.get('Enabled')
+ assert properties.get('Icon') == 'quake3arena', \
+ properties.get('Icon')
+ assert properties.get('Nickname') == 'AnArKi', \
+ properties.get('Nickname')
+
+ properties = account_props.GetAll(cs.ACCOUNT_IFACE_AVATAR)
+ assert properties.get('Avatar') == ([ord('f'), ord('o'), ord('o')],
+ 'image/jpeg')
+
+ properties = account_props.GetAll(cs.ACCOUNT_IFACE_NOKIA_COMPAT)
+ assert properties.get('Profile') == 'openarena'
+ assert sorted(properties.get('SecondaryVCardFields')) == \
+ ['x-ioquake3', 'x-quake3']
+
+ properties = account_props.GetAll(cs.ACCOUNT_IFACE_NOKIA_CONDITIONS)
+ assert properties.get('Condition') == {
+ 'has-quad-damage': ':y',
+ }
if __name__ == '__main__':
exec_test(test, {})
--
1.5.6.5
More information about the telepathy-commits
mailing list