devtools/testlib.py
branchstable
changeset 7163 d6d905d0344f
parent 7088 76e0dba5f8f3
child 7222 fcb8932082a5
--- a/devtools/testlib.py	Fri Apr 01 01:06:41 2011 +0200
+++ b/devtools/testlib.py	Fri Apr 01 14:26:18 2011 +0200
@@ -662,13 +662,16 @@
         """
         return self.expect_redirect(lambda x: self.app_publish(x, path), req)
 
-    def init_authentication(self, authmode, anonuser=None):
+    def set_auth_mode(self, authmode, anonuser=None):
         self.set_option('auth-mode', authmode)
         self.set_option('anonymous-user', anonuser)
         if anonuser is None:
             self.config.anonymous_credential = None
         else:
             self.config.anonymous_credential = (anonuser, anonuser)
+
+    def init_authentication(self, authmode, anonuser=None):
+        self.set_auth_mode(authmode, anonuser)
         req = self.request()
         origsession = req.session
         req.session = req.cnx = None