[Telepathy-commits] [telepathy-gabble/master] fix olpc-muc-prop-change.py

Guillaume Desmottes guillaume.desmottes at collabora.co.uk
Tue Aug 19 10:52:50 PDT 2008


20080529102216-7fe3f-a372fc8b17490a743e9e4f6f1f5f8d824af2fdf2.gz
---
 tests/twisted/olpc/olpc-muc-prop-change.py |   11 +++--------
 1 files changed, 3 insertions(+), 8 deletions(-)

diff --git a/tests/twisted/olpc/olpc-muc-prop-change.py b/tests/twisted/olpc/olpc-muc-prop-change.py
index da327ba..abaed93 100644
--- a/tests/twisted/olpc/olpc-muc-prop-change.py
+++ b/tests/twisted/olpc/olpc-muc-prop-change.py
@@ -55,8 +55,7 @@ def test(q, bus, conn, stream):
 
     event = q.expect('dbus-signal', signal='NewChannel')
 
-    if event.args[1] != 'org.freedesktop.Telepathy.Channel.Type.Text':
-        return False
+    assert event.args[1] == 'org.freedesktop.Telepathy.Channel.Type.Text'
 
     assert event.args[2] == 2   # handle type
     assert event.args[3] == 1   # handle
@@ -221,10 +220,8 @@ def test(q, bus, conn, stream):
     call_async(q, act_prop_iface, 'SetProperties',
             room_handle, {'title': 'I can set the properties too', 'private': True})
 
-    event = q.expect('stream-message')
+    event = q.expect('stream-message', to='chat at conf.localhost')
     message = event.stanza
-    if message['to'] != 'chat at conf.localhost':
-        return False
 
     properties = xpath.queryForNodes('/message/properties', message)
     assert (properties is not None and len(properties) == 1), repr(properties)
@@ -288,10 +285,8 @@ def test(q, bus, conn, stream):
         room_handle, {'title': 'I can set the properties too',
                               'private': False})
 
-    event = q.expect('stream-message')
+    event = q.expect('stream-message', to='chat at conf.localhost')
     message = event.stanza
-    if message['to'] != 'chat at conf.localhost':
-        return False
 
     properties = xpath.queryForNodes('/message/properties', message)
     assert (properties is not None and len(properties) == 1), repr(properties)
-- 
1.5.6.3




More information about the Telepathy-commits mailing list