# HG changeset patch # User Sylvain Thénault # Date 1253712407 -7200 # Node ID 84036ad2c82d54cf8471318b515adfdef4c3e19e # Parent 6d0f22f5d31f4415f9c8a864b8055f94cdaa6744 add anon user for TestServerConfiguration, no only AppTestConfiguration diff -r 6d0f22f5d31f -r 84036ad2c82d devtools/__init__.py --- a/devtools/__init__.py Wed Sep 23 13:43:00 2009 +0200 +++ b/devtools/__init__.py Wed Sep 23 15:26:47 2009 +0200 @@ -105,6 +105,8 @@ self.init_log(log_threshold, force=True) # need this, usually triggered by cubicweb-ctl self.load_cwctl_plugins() + self.global_set_option('anonymous-user', 'anon') + self.global_set_option('anonymous-password', 'anon') anonymous_user = TwistedConfiguration.anonymous_user.im_func @@ -116,6 +118,11 @@ return abspath('..') appdatahome = apphome + def load_configuration(self): + super(TestServerConfiguration, self).load_configuration() + self.global_set_option('anonymous-user', 'anon') + self.global_set_option('anonymous-password', 'anon') + def main_config_file(self): """return instance's control configuration file""" return join(self.apphome, '%s.conf' % self.name) @@ -179,13 +186,6 @@ BaseApptestConfiguration.__init__(self, appid, log_threshold=log_threshold) self.init_repository = sourcefile is None self.sourcefile = sourcefile - self.global_set_option('anonymous-user', 'anon') - self.global_set_option('anonymous-password', 'anon') - - def load_configuration(self): - super(ApptestConfiguration, self).load_configuration() - self.global_set_option('anonymous-user', 'anon') - self.global_set_option('anonymous-password', 'anon') # test database handling #######################################################