[tor-commits] [stem/master] Test different authentication styles with passwords

atagar at torproject.org atagar at torproject.org
Sun Jan 6 22:52:33 UTC 2013


commit 01cfab7d61cb167a786c509afb505ac9546e728b
Author: Sean Robinson <seankrobinson at gmail.com>
Date:   Sun Jan 6 08:48:51 2013 -0700

    Test different authentication styles with passwords
    
    This restores testing various authentication paths and keeps password
    use, if available.  RUN_COOKIE and RUN_SCOOKIE targets still do not
    work.
    
    Signed-off-by: Sean Robinson <seankrobinson at gmail.com>
---
 test/integ/control/controller.py |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/test/integ/control/controller.py b/test/integ/control/controller.py
index 22d06be..36e7f15 100644
--- a/test/integ/control/controller.py
+++ b/test/integ/control/controller.py
@@ -160,7 +160,7 @@ class TestController(unittest.TestCase):
       # reconnect and check that we get events again
       
       controller.connect()
-      controller.authenticate(password = test.runner.CONTROL_PASSWORD)
+      stem.connection.authenticate(controller, password = test.runner.CONTROL_PASSWORD)
       
       event_notice.wait(2)
       self.assertTrue(len(event_buffer) >= 1)
@@ -174,7 +174,10 @@ class TestController(unittest.TestCase):
       # reconnect and check that we get events again
       
       controller.connect()
-      controller.authenticate(password = test.runner.CONTROL_PASSWORD)
+      password = ""
+      if test.runner.CONTROL_PASSWORD:
+        password = " \"%s\"" % test.runner.CONTROL_PASSWORD
+      controller.msg("AUTHENTICATE%s" % password)
       
       event_notice.wait(2)
       self.assertTrue(len(event_buffer) >= 1)





More information about the tor-commits mailing list