[devtools] Fix database creation issues for CubicWebTestTC tests
To reproduce (with a purged repo):
* python web/test/test_jscript.py
* python web/test/unittest_views_xmlrss.py
The '__default_empty_db__' will contain the wrong 'base_url'
configuration, thus breaking URLs in the xmlrss tests.
Closes #9297611.
--- a/devtools/webtest.py Mon Dec 21 09:55:14 2015 +0100
+++ b/devtools/webtest.py Mon Dec 21 10:08:13 2015 +0100
@@ -7,13 +7,11 @@
class CubicWebTestTC(CubicWebTC):
- @classmethod
- def init_config(cls, config):
- super(CubicWebTestTC, cls).init_config(config)
- config.global_set_option('base-url', 'http://localhost.local/')
-
def setUp(self):
super(CubicWebTestTC, self).setUp()
+ self.config.global_set_option('base-url', 'http://localhost.local/')
+ # call load_configuration again to let the config reset its datadir_url
+ self.config.load_configuration()
webapp = handler.CubicWebWSGIApplication(self.config)
self.webapp = webtest.TestApp(webapp)