devtools/webtest.py
changeset 11016 d04703f54510
parent 9930 d20c2b262f55
--- 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)