125 |
125 |
126 def main_config_file(self): |
126 def main_config_file(self): |
127 """return instance's control configuration file""" |
127 """return instance's control configuration file""" |
128 return join(self.apphome, '%s.conf' % self.name) |
128 return join(self.apphome, '%s.conf' % self.name) |
129 |
129 |
130 def instance_md5_version(self): |
|
131 return '' |
|
132 |
|
133 def bootstrap_cubes(self): |
130 def bootstrap_cubes(self): |
134 try: |
131 try: |
135 super(TestServerConfiguration, self).bootstrap_cubes() |
132 super(TestServerConfiguration, self).bootstrap_cubes() |
136 except IOError: |
133 except IOError: |
137 # no cubes |
134 # no cubes |
160 sources = DEFAULT_SOURCES |
157 sources = DEFAULT_SOURCES |
161 if 'admin' not in sources: |
158 if 'admin' not in sources: |
162 sources['admin'] = DEFAULT_SOURCES['admin'] |
159 sources['admin'] = DEFAULT_SOURCES['admin'] |
163 return sources |
160 return sources |
164 |
161 |
|
162 # web config methods needed here for cases when we use this config as a web |
|
163 # config |
|
164 |
|
165 def instance_md5_version(self): |
|
166 return '' |
|
167 |
|
168 def default_base_url(self): |
|
169 return BASE_URL |
|
170 |
165 |
171 |
166 class BaseApptestConfiguration(TestServerConfiguration, TwistedConfiguration): |
172 class BaseApptestConfiguration(TestServerConfiguration, TwistedConfiguration): |
167 repo_method = 'inmemory' |
173 repo_method = 'inmemory' |
168 options = cwconfig.merge_options(TestServerConfiguration.options |
174 options = cwconfig.merge_options(TestServerConfiguration.options |
169 + TwistedConfiguration.options) |
175 + TwistedConfiguration.options) |
170 cubicweb_appobject_path = TestServerConfiguration.cubicweb_appobject_path | TwistedConfiguration.cubicweb_appobject_path |
176 cubicweb_appobject_path = TestServerConfiguration.cubicweb_appobject_path | TwistedConfiguration.cubicweb_appobject_path |
171 cube_appobject_path = TestServerConfiguration.cube_appobject_path | TwistedConfiguration.cube_appobject_path |
177 cube_appobject_path = TestServerConfiguration.cube_appobject_path | TwistedConfiguration.cube_appobject_path |
172 |
178 |
173 def available_languages(self, *args): |
179 def available_languages(self, *args): |
174 return ('en', 'fr', 'de') |
180 return ('en', 'fr', 'de') |
175 |
|
176 def default_base_url(self): |
|
177 return BASE_URL |
|
178 |
181 |
179 def pyro_enabled(self): |
182 def pyro_enabled(self): |
180 # but export PYRO_MULTITHREAD=0 or you get problems with sqlite and |
183 # but export PYRO_MULTITHREAD=0 or you get problems with sqlite and |
181 # threads |
184 # threads |
182 return True |
185 return True |