devtools/testlib.py
changeset 3647 2941f4a0aab9
parent 3589 a5432f99f2d9
child 3657 706d7bf0ae3d
--- a/devtools/testlib.py	Tue Oct 13 08:48:00 2009 +0200
+++ b/devtools/testlib.py	Tue Oct 13 08:50:19 2009 +0200
@@ -295,14 +295,16 @@
             self._orig_cnx.commit()
         return user
 
-    def login(self, login, password=None):
+    def login(self, login, **kwargs):
         """return a connection for the given login/password"""
         if login == self.admlogin:
             self.restore_connection()
         else:
+            if not kwargs:
+                kwargs['password'] = str(login)
             self.cnx = repo_connect(self.repo, unicode(login),
-                                    password or str(login),
-                                    ConnectionProperties('inmemory'))
+                                    cnxprops=ConnectionProperties('inmemory'),
+                                    **kwargs)
         if login == self.vreg.config.anonymous_user()[0]:
             self.cnx.anonymous_connection = True
         return self.cnx