[Telepathy-commits] [telepathy-gabble/master] olpc-activity-search.py: test if buddy are not removed from the view when they are still in one activity
Guillaume Desmottes
guillaume.desmottes at collabora.co.uk
Fri Sep 26 10:02:28 PDT 2008
20080630155809-7fe3f-d1e7760c14860addaa7742723516fa32d15576a9.gz
---
tests/twisted/olpc/olpc-activity-search.py | 29 ++++++++++++++++++++++++++++
1 files changed, 29 insertions(+), 0 deletions(-)
diff --git a/tests/twisted/olpc/olpc-activity-search.py b/tests/twisted/olpc/olpc-activity-search.py
index 0e38777..a66d53c 100644
--- a/tests/twisted/olpc/olpc-activity-search.py
+++ b/tests/twisted/olpc/olpc-activity-search.py
@@ -456,6 +456,35 @@ def test(q, bus, conn, stream):
('activity1', room1_handle),('activity4', room4_handle)],
['fernand at localhost', 'lucien at localhost', 'jean at localhost'])
+ # Jean left activity 1
+ message = domish.Element(('jabber:client', 'message'))
+ message['from'] = 'gadget.localhost'
+ message['to'] = 'alice at localhost'
+ message['type'] = 'notice'
+
+ activity = message.addElement((NS_OLPC_ACTIVITY, 'activity'))
+ activity['room'] = 'room1 at conference.localhost'
+ activity['id'] = '0'
+ left = activity.addElement((None, 'left'))
+ left['jid'] = 'jean at 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)
+
+ ## Current views ##
+ # view 0: activity 1 (with: Lucien), activity 4 (with Fernand, Jean)
+ # view 1: activity 2
+ # view 2: activity 3
+
+ # Jean wasn't removed from the view as he is still in activity 4
+ check_view(view0_iface, conn, [
+ ('activity1', room1_handle),('activity4', room4_handle)],
+ ['fernand at localhost', 'lucien at localhost', 'jean at localhost'])
+
# remove activity 1 from view 0
message = domish.Element((None, 'message'))
message['from'] = 'gadget.localhost'
--
1.5.6.5
More information about the Telepathy-commits
mailing list