devtools/webtest.py
changeset 11016 d04703f54510
parent 9930 d20c2b262f55
equal deleted inserted replaced
11015:baf463175505 11016:d04703f54510
     5 from cubicweb.wsgi import handler
     5 from cubicweb.wsgi import handler
     6 from cubicweb.devtools.testlib import CubicWebTC
     6 from cubicweb.devtools.testlib import CubicWebTC
     7 
     7 
     8 
     8 
     9 class CubicWebTestTC(CubicWebTC):
     9 class CubicWebTestTC(CubicWebTC):
    10     @classmethod
       
    11     def init_config(cls, config):
       
    12         super(CubicWebTestTC, cls).init_config(config)
       
    13         config.global_set_option('base-url', 'http://localhost.local/')
       
    14 
       
    15     def setUp(self):
    10     def setUp(self):
    16         super(CubicWebTestTC, self).setUp()
    11         super(CubicWebTestTC, self).setUp()
       
    12         self.config.global_set_option('base-url', 'http://localhost.local/')
       
    13         # call load_configuration again to let the config reset its datadir_url
       
    14         self.config.load_configuration()
    17         webapp = handler.CubicWebWSGIApplication(self.config)
    15         webapp = handler.CubicWebWSGIApplication(self.config)
    18         self.webapp = webtest.TestApp(webapp)
    16         self.webapp = webtest.TestApp(webapp)
    19 
    17 
    20     def tearDown(self):
    18     def tearDown(self):
    21         del self.webapp
    19         del self.webapp