devtools/testlib.py
changeset 9042 6cc13a0a9145
parent 9039 488255d1cf3b
child 9043 97c3bb9a7c99
equal deleted inserted replaced
9041:753a159c8822 9042:6cc13a0a9145
   399         autoclose = kwargs.pop('autoclose', True)
   399         autoclose = kwargs.pop('autoclose', True)
   400         if not kwargs:
   400         if not kwargs:
   401             kwargs['password'] = str(login)
   401             kwargs['password'] = str(login)
   402         self.set_cnx(dbapi._repo_connect(self.repo, unicode(login), **kwargs))
   402         self.set_cnx(dbapi._repo_connect(self.repo, unicode(login), **kwargs))
   403         self.websession = dbapi.DBAPISession(self.cnx)
   403         self.websession = dbapi.DBAPISession(self.cnx)
   404         if login == self.vreg.config.anonymous_user()[0]:
       
   405             self.cnx.anonymous_connection = True
       
   406         if autoclose:
   404         if autoclose:
   407             return TestCaseConnectionProxy(self, self.cnx)
   405             return TestCaseConnectionProxy(self, self.cnx)
   408         return self.cnx
   406         return self.cnx
   409 
   407 
   410     def restore_connection(self):
   408     def restore_connection(self):