[tor-commits] [stem/master] Fix test_setconf_event test when CONF_CHANGED event comes first

atagar at torproject.org atagar at torproject.org
Sun Feb 12 05:52:41 UTC 2017


commit e6cd021cd428ecbd0cd8adbf0c070b84c125aff7
Author: Damian Johnson <atagar at torproject.org>
Date:   Thu Feb 2 10:48:51 2017 -0800

    Fix test_setconf_event test when CONF_CHANGED event comes first
    
    Oops, our earlier fix to work regardless of the order actually broke the test
    if CONF_CHANGED comes in first. Trouble is that we check for an int rather than
    a string status code.
---
 test/integ/socket/control_message.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/test/integ/socket/control_message.py b/test/integ/socket/control_message.py
index 47f77c1..5f6ff42 100644
--- a/test/integ/socket/control_message.py
+++ b/test/integ/socket/control_message.py
@@ -166,7 +166,7 @@ class TestControlMessage(unittest.TestCase):
       msg1 = control_socket.recv()
       msg2 = control_socket.recv()
 
-      if msg1.content()[0][0] == 650:
+      if msg1.content()[0][0] == '650':
         conf_changed_event, setconf_response = msg1, msg2
       else:
         setconf_response, conf_changed_event = msg1, msg2





More information about the tor-commits mailing list