[Telepathy-commits] [telepathy-gabble/master] Fix test: do not use a variable before its initialisation

Alban Crequy alban.crequy at collabora.co.uk
Fri Dec 5 09:42:41 PST 2008


---
 tests/twisted/tubes/test-si-tubes.py |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/tests/twisted/tubes/test-si-tubes.py b/tests/twisted/tubes/test-si-tubes.py
index ca7b389..c45af99 100644
--- a/tests/twisted/tubes/test-si-tubes.py
+++ b/tests/twisted/tubes/test-si-tubes.py
@@ -107,7 +107,8 @@ def check_channel_properties(q, bus, conn, stream, channel, channel_type,
     assert channel_props['TargetID'] == contact_id
     assert channel_props['Requested'] == True
     assert channel_props['InitiatorID'] == 'test at localhost'
-    assert channel_props['InitiatorHandle'] == self_handle
+    assert channel_props['InitiatorHandle'] == conn.GetSelfHandle()
+
 
     if channel_type == "Tubes":
         assert state is None
@@ -121,8 +122,6 @@ def check_channel_properties(q, bus, conn, stream, channel, channel_type,
         assert tube_props['Parameters'] is not None
         assert tube_props['Initiator'] is not None
 
-    self_handle = conn.GetSelfHandle()
-
 def check_NewChannel_signal(old_sig, channel_type, chan_path, contact_handle):
     assert old_sig[0] == chan_path
     assert old_sig[1] == tp_name_prefix + '.Channel.Type.' + channel_type
-- 
1.5.6.5




More information about the Telepathy-commits mailing list