devtools/_apptest.py
changeset 387 dbe9997ffc7e
parent 0 b97547f5f1fa
child 1133 8a409ea0c9ec
--- a/devtools/_apptest.py	Mon Jan 12 10:57:26 2009 +0100
+++ b/devtools/_apptest.py	Mon Jan 12 10:57:51 2009 +0100
@@ -130,11 +130,12 @@
         self._orig_cnx.commit()
         return user
 
-    def login(self, login):
+    def login(self, login, password=None):
         if login == self.admlogin:
             self.restore_connection()
         else:
-            self.cnx = repo_connect(self.repo, unicode(login), str(login),
+            self.cnx = repo_connect(self.repo, unicode(login),
+                                    password or str(login),
                                     ConnectionProperties('inmemory'))
         if login == self.vreg.config.anonymous_user()[0]:
             self.cnx.anonymous_connection = True