[stem/master] Tor 0.2.2.9 required for tests with new/extend_circuit()

commit c34e90b55d744b0e19922d61b638c8987b089233 Author: Damian Johnson <atagar@torproject.org> Date: Sun Dec 30 19:39:54 2012 -0800 Tor 0.2.2.9 required for tests with new/extend_circuit() Our tests utilizing new_circuit() and extend_circuit() do not provide an explicit path. This breaks the tests if tor isn't version 0.2.2.9 or later. https://trac.torproject.org/7833 --- test/integ/control/controller.py | 8 +++++++- 1 files changed, 7 insertions(+), 1 deletions(-) diff --git a/test/integ/control/controller.py b/test/integ/control/controller.py index c8055ab..534bba2 100644 --- a/test/integ/control/controller.py +++ b/test/integ/control/controller.py @@ -24,6 +24,7 @@ import test.runner import test.util from stem.control import EventType +from stem.version import Requirement class TestController(unittest.TestCase): def test_from_port(self): @@ -515,6 +516,7 @@ class TestController(unittest.TestCase): def test_extendcircuit(self): if test.runner.require_control(self): return elif test.runner.require_online(self): return + elif test.runner.require_version(self, Requirement.EXTENDCIRCUIT_PATH_OPTIONAL): return with test.runner.get_runner().get_tor_controller() as controller: circuit_id = controller.extend_circuit('0') @@ -535,6 +537,7 @@ class TestController(unittest.TestCase): if test.runner.require_control(self): return elif test.runner.require_online(self): return + elif test.runner.require_version(self, Requirement.EXTENDCIRCUIT_PATH_OPTIONAL): return runner = test.runner.get_runner() @@ -558,6 +561,7 @@ class TestController(unittest.TestCase): if test.runner.require_control(self): return elif test.runner.require_online(self): return + elif test.runner.require_version(self, Requirement.EXTENDCIRCUIT_PATH_OPTIONAL): return runner = test.runner.get_runner() @@ -722,6 +726,7 @@ class TestController(unittest.TestCase): def test_attachstream(self): if test.runner.require_control(self): return elif test.runner.require_online(self): return + elif test.runner.require_version(self, Requirement.EXTENDCIRCUIT_PATH_OPTIONAL): return circuit_id = None @@ -753,7 +758,8 @@ class TestController(unittest.TestCase): """ if test.runner.require_control(self): return - if test.runner.require_online(self): return + elif test.runner.require_online(self): return + elif test.runner.require_version(self, Requirement.EXTENDCIRCUIT_PATH_OPTIONAL): return runner = test.runner.get_runner() with runner.get_tor_controller() as controller:
participants (1)
-
atagar@torproject.org