--- a/web/test/unittest_web.py Wed Apr 01 15:50:59 2015 +0200
+++ b/web/test/unittest_web.py Wed Apr 22 12:26:44 2015 +0200
@@ -126,17 +126,24 @@
self.assertIn('HttpOnly', webreq.getheader('set-cookie'))
-class LogQueriesTC(CubicWebServerTC):
+class MiscOptionsTC(CubicWebServerTC):
@classmethod
def init_config(cls, config):
- super(LogQueriesTC, cls).init_config(config)
+ super(MiscOptionsTC, cls).init_config(config)
cls.logfile = tempfile.NamedTemporaryFile()
config.global_set_option('query-log-file', cls.logfile.name)
+ config.global_set_option('datadir-url', '//static.testing.fr/')
+ # call load_configuration again to let the config reset its datadir_url
+ config.load_configuration()
def test_log_queries(self):
self.web_request()
self.assertTrue(self.logfile.read())
+ def test_datadir_url(self):
+ webreq = self.web_request()
+ self.assertNotIn('/data/', webreq.read())
+
@classmethod
def tearDownClass(cls):
cls.logfile.close()