devtools/testlib.py
changeset 10937 eb05348b0e2d
parent 10837 b71511460a4f
child 10974 6557833657d6
equal deleted inserted replaced
10936:c3606b52092c 10937:eb05348b0e2d
   370         # web resources
   370         # web resources
   371         try:
   371         try:
   372             config.global_set_option('embed-allowed', re.compile('.*'))
   372             config.global_set_option('embed-allowed', re.compile('.*'))
   373         except Exception: # not in server only configuration
   373         except Exception: # not in server only configuration
   374             pass
   374             pass
   375         config.set_anonymous_allowed(cls.anonymous_allowed)
       
   376 
   375 
   377     @property
   376     @property
   378     def vreg(self):
   377     def vreg(self):
   379         return self.repo.vreg
   378         return self.repo.vreg
   380 
   379 
   408                 self._init_repo()
   407                 self._init_repo()
   409             except Exception as ex:
   408             except Exception as ex:
   410                 self.__class__._repo_init_failed = ex
   409                 self.__class__._repo_init_failed = ex
   411                 raise
   410                 raise
   412             self.addCleanup(self._close_access)
   411             self.addCleanup(self._close_access)
       
   412         self.config.set_anonymous_allowed(self.anonymous_allowed)
   413         self.setup_database()
   413         self.setup_database()
   414         MAILBOX[:] = [] # reset mailbox
   414         MAILBOX[:] = [] # reset mailbox
   415 
   415 
   416     def tearDown(self):
   416     def tearDown(self):
   417         # XXX hack until logilab.common.testlib is fixed
   417         # XXX hack until logilab.common.testlib is fixed