[Telepathy-commits] [telepathy-gabble/master] remove gadget tests from change-notifications.py. They have to be done in olpc-buddy-search and olpc-activity-search

Guillaume Desmottes guillaume.desmottes at collabora.co.uk
Fri Sep 26 10:02:23 PDT 2008


20080627133652-7fe3f-32632f8ec5110f6ea5e3e633ec4975c9b9d6bd80.gz
---
 tests/twisted/olpc/change-notifications.py |   84 ----------------------------
 tests/twisted/olpc/olpc-activity-search.py |    2 +
 2 files changed, 2 insertions(+), 84 deletions(-)

diff --git a/tests/twisted/olpc/change-notifications.py b/tests/twisted/olpc/change-notifications.py
index 2dbb24c..6fe22c9 100644
--- a/tests/twisted/olpc/change-notifications.py
+++ b/tests/twisted/olpc/change-notifications.py
@@ -76,34 +76,6 @@ def test(q, bus, conn, stream):
 
     assert props == {'color' : '#005FE4,#00A0FF'}
 
-    # The indexer informs us about a buddy properties change.
-    message = domish.Element(('jabber:client', 'message'))
-    message['from'] = 'gadget.localhost'
-    message['to'] = 'test at localhost'
-    message['type'] = 'notice'
-
-    change = message.addElement((NS_OLPC_BUDDY, 'change'))
-    change['jid'] = 'bob at localhost'
-    properties = change.addElement((NS_OLPC_BUDDY_PROPS, 'properties'))
-    property = properties.addElement((None, 'property'))
-    property['type'] = 'str'
-    property['name'] = 'color'
-    property.addContent('#FFFFFF,#AAAAAA')
-
-    amp = message.addElement((NS_AMP, 'amp'))
-    rule = amp.addElement((None, 'rule'))
-    rule['condition'] = 'deliver-at'
-    rule['value'] = 'stored'
-    rule['action'] ='error'
-
-    stream.send(message)
-
-    event = q.expect('dbus-signal', signal='PropertiesChanged')
-    contact = event.args[0]
-    props = event.args[1]
-
-    assert props == {'color' : '#FFFFFF,#AAAAAA'}
-
     # Alice changes now her current-activity
     message = domish.Element(('jabber:client', 'message'))
     message['from'] = 'alice at localhost'
@@ -130,61 +102,5 @@ def test(q, bus, conn, stream):
     assert activity == 'testactivity'
     assert room_id == 'testroom at conference.localhost'
 
-    # The indexer informs us about a buddy current-activity change.
-    message = domish.Element(('jabber:client', 'message'))
-    message['from'] = 'gadget.localhost'
-    message['to'] = 'test at localhost'
-    message['type'] = 'notice'
-
-    change = message.addElement((NS_OLPC_BUDDY, 'change'))
-    change['jid'] = 'bob at localhost'
-    activity = change.addElement((NS_OLPC_CURRENT_ACTIVITY, 'activity'))
-    activity['type'] = 'testactivity2'
-    activity['room'] = 'testroom2 at conference.localhost'
-
-    amp = message.addElement((NS_AMP, 'amp'))
-    rule = amp.addElement((None, 'rule'))
-    rule['condition'] = 'deliver-at'
-    rule['value'] = 'stored'
-    rule['action'] ='error'
-    stream.send(message)
-
-    event = q.expect('dbus-signal', signal='CurrentActivityChanged')
-    contact = event.args[0]
-    activity = event.args[1]
-    room = event.args[2]
-    room_id = conn.InspectHandles(2, [room])[0]
-
-    assert activity == 'testactivity2'
-    assert room_id == 'testroom2 at conference.localhost'
-
-    # The indexer informs us about an activity properties change
-    message = domish.Element(('jabber:client', 'message'))
-    message['from'] = 'gadget.localhost'
-    message['to'] = 'test at localhost'
-    message['type'] = 'notice'
-
-    change = message.addElement((NS_OLPC_ACTIVITY, 'change'))
-    change['activity'] = 'testactivity'
-    change['room'] = 'testactivity at conference.localhost'
-    properties = change.addElement((NS_OLPC_ACTIVITY_PROPS, 'properties'))
-    property = properties.addElement((None, 'property'))
-    property['type'] = 'str'
-    property['name'] = 'tags'
-    property.addContent('game')
-
-    amp = message.addElement((NS_AMP, 'amp'))
-    rule = amp.addElement((None, 'rule'))
-    rule['condition'] = 'deliver-at'
-    rule['value'] = 'stored'
-    rule['action'] ='error'
-    stream.send(message)
-
-    event = q.expect('dbus-signal', signal='ActivityPropertiesChanged')
-    room = event.args[0]
-    properties = event.args[1]
-
-    assert properties == {'tags': 'game'}
-
 if __name__ == '__main__':
     exec_test(test)
diff --git a/tests/twisted/olpc/olpc-activity-search.py b/tests/twisted/olpc/olpc-activity-search.py
index 1c602af..f41294b 100644
--- a/tests/twisted/olpc/olpc-activity-search.py
+++ b/tests/twisted/olpc/olpc-activity-search.py
@@ -340,6 +340,8 @@ def test(q, bus, conn, stream):
     assert id == 'activity1'
     assert handle == room1_handle
 
+    # FIXME: test activity properties change from gadget
+
     # close view 0
     call_async(q, view0_iface, 'Close')
     event, _ = q.expect_many(
-- 
1.5.6.5




More information about the Telepathy-commits mailing list