commit 9119f9f0d0091a030654002a2e7ae6ccf91a789f Author: Sean Robinson seankrobinson@gmail.com Date: Sun Dec 16 19:32:22 2012 -0700
Fix test_close_circuit crash by concatenating strings
Traceback: File "./test/integ/control/controller.py", line 521, in test_close_circuit self.assertRaises(stem.InvalidArguments, controller.close_circuit, circ_id + 1024) TypeError: cannot concatenate 'str' and 'int' objects
Also, change to standard variable name "circuit_id".
Signed-off-by: Sean Robinson seankrobinson@gmail.com --- test/integ/control/controller.py | 12 ++++++------ 1 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/test/integ/control/controller.py b/test/integ/control/controller.py index 0cee344..969836b 100644 --- a/test/integ/control/controller.py +++ b/test/integ/control/controller.py @@ -552,20 +552,20 @@ class TestController(unittest.TestCase): runner = test.runner.get_runner()
with runner.get_tor_controller() as controller: - circ_id = controller.new_circuit() - controller.close_circuit(circ_id) + circuit_id = controller.new_circuit() + controller.close_circuit(circuit_id) circuit_output = controller.get_info("circuit-status") circ = [x.split()[0] for x in circuit_output.splitlines()] self.assertFalse(circ_id in circ)
- circ_id = controller.new_circuit() - controller.close_circuit(circ_id, "IfUnused") + circuit_id = controller.new_circuit() + controller.close_circuit(circuit_id, "IfUnused") circuit_output = controller.get_info("circuit-status") circ = [x.split()[0] for x in circuit_output.splitlines()] self.assertFalse(circ_id in circ)
- circ_id = controller.new_circuit() - self.assertRaises(stem.InvalidArguments, controller.close_circuit, circ_id + 1024) + circuit_id = controller.new_circuit() + self.assertRaises(stem.InvalidArguments, controller.close_circuit, circuit_id + "1024") self.assertRaises(stem.InvalidRequest, controller.close_circuit, "")
def test_mapaddress(self):
tor-commits@lists.torproject.org