[Telepathy-commits] [telepathy-gabble/master] olpc-activity-search.py: add a participant to activity4

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


20080630154311-7fe3f-872ad20c295d1338fdc25e2308bac3368f7cf502.gz
---
 tests/twisted/olpc/olpc-activity-search.py |   18 +++++++++++-------
 1 files changed, 11 insertions(+), 7 deletions(-)

diff --git a/tests/twisted/olpc/olpc-activity-search.py b/tests/twisted/olpc/olpc-activity-search.py
index 2bf0b61..0e38777 100644
--- a/tests/twisted/olpc/olpc-activity-search.py
+++ b/tests/twisted/olpc/olpc-activity-search.py
@@ -303,6 +303,8 @@ def test(q, bus, conn, stream):
     property = properties.addElement((None, "property"))
     property['type'] = 'str'
     property['name'] = 'color'
+    buddy = activity.addElement((None, 'buddy'))
+    buddy['jid'] = 'jean at localhost'
     property.addContent('#AABBAA,#BBAABB')
     amp = message.addElement((NS_AMP, 'amp'))
     rule = amp.addElement((None, 'rule'))
@@ -312,14 +314,15 @@ def test(q, bus, conn, stream):
     stream.send(message)
 
     ## Current views ##
-    # view 0: activity 1 (with: Lucien, Jean), activity 4 (with Fernand)
+    # view 0: activity 1 (with: Lucien, Jean), activity 4 (with: Fernand, Jean)
     # view 1: activity 2
     # view 2: activity 3
     # participants are added to view
 
     event = q.expect('dbus-signal', signal='BuddiesChanged')
     members_handles, removed = event.args
-    assert conn.InspectHandles(1, members_handles) == ['fernand at localhost']
+    assert sorted(conn.InspectHandles(1, members_handles)) == \
+            sorted(['fernand at localhost', 'jean at localhost'])
 
     # activity is added too
     event = q.expect('dbus-signal', signal='ActivitiesChanged')
@@ -397,7 +400,8 @@ def test(q, bus, conn, stream):
     stream.send(message)
 
     ## Current views ##
-    # view 0: activity 1 (with: Lucien, Jean, Marcel), activity 4 (with Fernand)
+    # view 0: activity 1 (with: Lucien, Jean, Marcel), activity 4 (with
+    # Fernand, Jean)
     # view 1: activity 2
     # view 2: activity 3
 
@@ -439,7 +443,7 @@ def test(q, bus, conn, stream):
     stream.send(message)
 
     ## Current views ##
-    # view 0: activity 1 (with: Lucien, Jean), activity 4 (with Fernand)
+    # view 0: activity 1 (with: Lucien, Jean), activity 4 (with Fernand, Jean)
     # view 1: activity 2
     # view 2: activity 3
 
@@ -477,8 +481,8 @@ def test(q, bus, conn, stream):
     # participants are removed from the view
     event = q.expect('dbus-signal', signal='BuddiesChanged')
     added, removed = event.args
-    assert conn.InspectHandles(1, removed) == ['lucien at localhost',
-            'jean at localhost']
+    assert sorted(conn.InspectHandles(1, removed)) == \
+            sorted(['lucien at localhost'])
     # FIXME: BuddyInfo.ActivitiesChanged
 
     # activity is removed
@@ -492,7 +496,7 @@ def test(q, bus, conn, stream):
     # check activities and buddies in view
     check_view(view0_iface, conn, [
         ('activity4', room4_handle)],
-        ['fernand at localhost'])
+        ['fernand at localhost', 'jean at localhost'])
 
     # close view 0
     call_async(q, view0_iface, 'Close')
-- 
1.5.6.5




More information about the Telepathy-commits mailing list