[telepathy-gabble/master] Explicitly check 'nat-traversal' property

Will Thompson will.thompson at collabora.co.uk
Mon Jun 29 04:17:48 PDT 2009


Waiting for a PropertiesChanged notification is racy, and it's wrong
anyway: there's no guarantee that the property should *change* to
'ice-udp', it should just *be* 'ice-udp'.
---
 tests/twisted/jingle/test-outgoing-iceudp.py |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/tests/twisted/jingle/test-outgoing-iceudp.py b/tests/twisted/jingle/test-outgoing-iceudp.py
index ff145dd..32b975f 100644
--- a/tests/twisted/jingle/test-outgoing-iceudp.py
+++ b/tests/twisted/jingle/test-outgoing-iceudp.py
@@ -41,8 +41,12 @@ def worker(jp, q, bus, conn, stream):
     e = q.expect('dbus-signal', signal='NewSessionHandler')
     assert e.args[1] == 'rtp'
 
-    # Gabble changes nat-traversal property to "ice-udp"
-    q.expect('dbus-signal', signal="PropertiesChanged", args=[[(0, 'ice-udp')]])
+    # The 'nat-traversal' tp property should be "ice-udp"
+    hrggh = chan.ListProperties(dbus_interface=cs.TP_AWKWARD_PROPERTIES)
+    id = [x for x, name, _, _ in hrggh if name == 'nat-traversal'][0]
+    nrgrg = chan.GetProperties([id], dbus_interface=cs.TP_AWKWARD_PROPERTIES)
+    _, nat_traversal = nrgrg[0]
+    assertEquals('ice-udp', nat_traversal)
 
     session_handler = make_channel_proxy(conn, e.args[0], 'Media.SessionHandler')
     session_handler.Ready()
-- 
1.5.6.5



More information about the telepathy-commits mailing list