commit f87d9d75ef76b8755e5a3f78ae85002050ef8db0 Author: Damian Johnson atagar@torproject.org Date: Sun Dec 30 16:40:32 2012 -0800
Using get_socks_listeners() for attachstream test
Using our shiny new get_socks_listeners() method in test_attachstream. Besides being nicer, this will work with older versions of tor. --- test/integ/control/controller.py | 7 ++++--- 1 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/test/integ/control/controller.py b/test/integ/control/controller.py index f6fd147..fb14120 100644 --- a/test/integ/control/controller.py +++ b/test/integ/control/controller.py @@ -725,11 +725,12 @@ class TestController(unittest.TestCase): if test.runner.require_control(self): return elif test.runner.require_online(self): return
+ circuit_id, circ_status_q = None, Queue() + def handle_streamcreated(stream): if stream.status == "NEW": - controller.attach_stream(int(stream.id), int(circuit_id)) + controller.attach_stream(stream.id, circuit_id)
- circ_status_q = Queue() def handle_circ(circuit): circ_status_q.put(circuit)
@@ -739,7 +740,7 @@ class TestController(unittest.TestCase): controller.add_event_listener(handle_streamcreated, stem.control.EventType.STREAM)
try: - socksport = int(controller.get_conf('SocksListenAddress').rsplit(':', 1)[1]) + socksport = controller.get_socks_listeners()[0][1] circ_status = ""
while circ_status != "BUILT":
tor-commits@lists.torproject.org