def testGetConfigObject(self): """Test the getConfigObject() method""" cfg_class = 'config.file.FileConfig' cfg_file = '%s/test_data/config.ini' % utils.getRootPath() cfg_object = runserver.getConfigObject(cfg_class, cfg_file) self.assertTrue(isinstance(cfg_object, file.FileConfig))
def get_app(self): # Generate a real application server based on our test config data cfg = runserver.getConfigObject( 'hooky.config.file.FileConfig', '%s/test_data/config.ini' % utils.getRootPath()) server = app.getApplication(cfg) return server
def get_app(self): cfg_class = 'config.file.FileConfig' cfg_file = '%s/test_data/config.ini' % utils.getRootPath() config = runserver.getConfigObject(cfg_class, cfg_file) URLS = [ ('/hook', hook.HookRootHandler, {'config': config}), (r"/hook/(.*)", hook.HookHandler, {'config': config})] return web.Application(URLS)