[telepathy-mission-control/master] test-account.py: exercise property setting for more properties
Simon McVittie
simon.mcvittie at collabora.co.uk
Tue May 5 08:21:52 PDT 2009
---
test/twisted/test-account.py | 22 ++++++++++++++++++++++
1 files changed, 22 insertions(+), 0 deletions(-)
diff --git a/test/twisted/test-account.py b/test/twisted/test-account.py
index 4991d22..3b610c5 100644
--- a/test/twisted/test-account.py
+++ b/test/twisted/test-account.py
@@ -125,6 +125,26 @@ def test(q, bus, mc):
)
assert account_props.Get(cs.ACCOUNT, 'HasBeenOnline') == True
+ call_async(q, account_props, 'Set', cs.ACCOUNT_IFACE_NOKIA_COMPAT,
+ 'SecondaryVCardFields',
+ ['x-badger', 'x-mushroom'])
+ # there's no change notification for the Compat properties
+ q.expect_many(
+ EventPattern('dbus-return', method='Set'),
+ )
+ assert account_props.Get(cs.ACCOUNT_IFACE_NOKIA_COMPAT,
+ 'SecondaryVCardFields') == ['x-badger', 'x-mushroom']
+
+ call_async(q, account_props, 'Set', cs.ACCOUNT_IFACE_NOKIA_CONDITIONS,
+ 'Condition',
+ dbus.Dictionary({':foo': 'bar'}, signature='ss'))
+ # there's no change notification for the Condition
+ q.expect_many(
+ EventPattern('dbus-return', method='Set'),
+ )
+ assert account_props.Get(cs.ACCOUNT_IFACE_NOKIA_CONDITIONS,
+ 'Condition') == {':foo': 'bar'}
+
# Set some properties to invalidly typed values - this currently succeeds
# but is a no-op, although in future it should change to raising an
# exception
@@ -179,6 +199,8 @@ def test(q, bus, mc):
assert properties['Icon'] == 'im-jabber'
properties = account_props.GetAll(cs.ACCOUNT_IFACE_AVATAR)
assert properties['Avatar'] == ([], '')
+ properties = account_props.GetAll(cs.ACCOUNT_IFACE_NOKIA_COMPAT)
+ assert properties['SecondaryVCardFields'] == ['x-badger', 'x-mushroom']
# Delete the account
assert account_iface.Remove() is None
--
1.5.6.5
More information about the telepathy-commits
mailing list