[telepathy-gabble/master] vcard/test-avatar-async.py: use make_result_iq

Guillaume Desmottes guillaume.desmottes at collabora.co.uk
Fri Jul 3 05:44:15 PDT 2009


---
 tests/twisted/vcard/test-avatar-async.py |    7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/tests/twisted/vcard/test-avatar-async.py b/tests/twisted/vcard/test-avatar-async.py
index e28372e..af768a9 100644
--- a/tests/twisted/vcard/test-avatar-async.py
+++ b/tests/twisted/vcard/test-avatar-async.py
@@ -7,7 +7,7 @@ import base64
 import hashlib
 
 from servicetest import EventPattern
-from gabbletest import exec_test, acknowledge_iq
+from gabbletest import exec_test, acknowledge_iq, make_result_iq
 
 def test(q, bus, conn, stream):
     conn.Connect()
@@ -23,12 +23,11 @@ def test(q, bus, conn, stream):
 
     iq_event = q.expect('stream-iq', to='bob at foo.com', query_ns='vcard-temp',
         query_name='vCard')
-    iq = iq_event.stanza
-    vcard = iq_event.query
+    iq = make_result_iq(stream, iq_event.stanza)
+    vcard = iq.firstChildElement()
     photo = vcard.addElement('PHOTO')
     photo.addElement('TYPE', content='image/png')
     photo.addElement('BINVAL', content=base64.b64encode('hello'))
-    iq['type'] = 'result'
     stream.send(iq)
 
     event = q.expect('dbus-signal', signal='AvatarRetrieved')
-- 
1.5.6.5




More information about the telepathy-commits mailing list