devtools/__init__.py
changeset 4913 083b4d454192
parent 4761 e37932b89a6a
child 5021 58e89f3dfbae
child 5043 fe52dd3936cf
equal deleted inserted replaced
4912:9767cc516b4f 4913:083b4d454192
   104     def __init__(self, appid, log_threshold=logging.CRITICAL+10):
   104     def __init__(self, appid, log_threshold=logging.CRITICAL+10):
   105         ServerConfiguration.__init__(self, appid)
   105         ServerConfiguration.__init__(self, appid)
   106         self.init_log(log_threshold, force=True)
   106         self.init_log(log_threshold, force=True)
   107         # need this, usually triggered by cubicweb-ctl
   107         # need this, usually triggered by cubicweb-ctl
   108         self.load_cwctl_plugins()
   108         self.load_cwctl_plugins()
   109         self.global_set_option('anonymous-user', 'anon')
       
   110         self.global_set_option('anonymous-password', 'anon')
       
   111 
   109 
   112     anonymous_user = TwistedConfiguration.anonymous_user.im_func
   110     anonymous_user = TwistedConfiguration.anonymous_user.im_func
   113 
   111 
   114     @property
   112     @property
   115     def apphome(self):
   113     def apphome(self):
   121 
   119 
   122     def load_configuration(self):
   120     def load_configuration(self):
   123         super(TestServerConfiguration, self).load_configuration()
   121         super(TestServerConfiguration, self).load_configuration()
   124         self.global_set_option('anonymous-user', 'anon')
   122         self.global_set_option('anonymous-user', 'anon')
   125         self.global_set_option('anonymous-password', 'anon')
   123         self.global_set_option('anonymous-password', 'anon')
       
   124         # no undo support in tests
       
   125         self.global_set_option('undo-support', '')
   126 
   126 
   127     def main_config_file(self):
   127     def main_config_file(self):
   128         """return instance's control configuration file"""
   128         """return instance's control configuration file"""
   129         return join(self.apphome, '%s.conf' % self.name)
   129         return join(self.apphome, '%s.conf' % self.name)
   130 
   130