[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [stem/master] Fix test_extendcircuit by removing int() conversion



commit 568722919c499c1e409680fe38fb3471a97b425c
Author: Sean Robinson <seankrobinson@xxxxxxxxx>
Date:   Sun Dec 16 20:02:49 2012 -0700

    Fix test_extendcircuit by removing int() conversion
    
    Traceback:
      File "./test/integ/control/controller.py", line 464, in test_extendcircuit
        self.assertTrue(filter(lambda x: int(x.split()[0]) == circ_id, controller.get_info('circuit-status').splitlines()))
    AssertionError: [] is not true
    
    Also, change to standard variable name "circuit_id".
---
 test/integ/control/controller.py |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/test/integ/control/controller.py b/test/integ/control/controller.py
index 8c68ee2..4388cdc 100644
--- a/test/integ/control/controller.py
+++ b/test/integ/control/controller.py
@@ -506,11 +506,11 @@ class TestController(unittest.TestCase):
     elif test.runner.require_online(self): return
     
     with test.runner.get_runner().get_tor_controller() as controller:
-      circ_id = controller.extend_circuit('0')
+      circuit_id = controller.extend_circuit('0')
       # check if our circuit was created
-      self.assertTrue(filter(lambda x: int(x.split()[0]) == circ_id, controller.get_info('circuit-status').splitlines()))
-      circ_id = controller.new_circuit()
-      self.assertTrue(filter(lambda x: int(x.split()[0]) == circ_id, controller.get_info('circuit-status').splitlines()))
+      self.assertTrue(filter(lambda x: x.split()[0] == circuit_id, controller.get_info('circuit-status').splitlines()))
+      circuit_id = controller.new_circuit()
+      self.assertTrue(filter(lambda x: x.split()[0] == circuit_id, controller.get_info('circuit-status').splitlines()))
       
       self.assertRaises(stem.InvalidRequest, controller.extend_circuit, "foo")
       self.assertRaises(stem.InvalidRequest, controller.extend_circuit, '0', "thisroutershouldntexistbecausestemexists!@##$%#")



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits