def setUpClass(self): cfg = RZ_Config.init_from_file('res/etc/rhizi-server.conf') self.db_ctl = dbc.DB_Controller(cfg.db_base_url) rz_api.db_ctl = self.db_ctl # TODO extract to superclass log = logging.getLogger('rhizi') log.setLevel(logging.DEBUG) log_handler_c = logging.StreamHandler() log.addHandler(log_handler_c)
def test_rzdb__init_DB(self): rz_cfg = RZ_Config.generate_default() op = DBO_rzdb__init_DB(rz_cfg.rzdoc__mainpage_name) try: # assert first init call passes self.db_ctl.exec_op(op) except: self.fail() try: # assert second init call fails self.db_ctl.exec_op(op) except: return self.fail()
def setUpClass(self): cfg = RZ_Config.init_from_file("res/etc/rhizi-server.conf") self.db_ctl = db_controller.DB_Controller(cfg.db_base_url) self.log = logging.getLogger("rhizi") self.log.addHandler(logging.StreamHandler()) # bootstrap kernel kernel = RZ_Kernel() kernel.db_ctl = self.db_ctl kernel.db_op_factory = DBO_factory__default() kernel.start() self.kernel = kernel while not self.kernel.is_DB_status__ok(): # wait for kernel to initialize... time.sleep(0.3)
def setUpClass(self): cfg = RZ_Config.init_from_file('res/etc/rhizi-server.conf') self.db_ctl = db_controller.DB_Controller(cfg.db_base_url) self.log = logging.getLogger('rhizi') self.log.addHandler(logging.StreamHandler()) # bootstrap kernel kernel = RZ_Kernel() kernel.db_ctl = self.db_ctl kernel.db_op_factory = DBO_factory__default() kernel.start() self.kernel = kernel while not self.kernel.is_DB_status__ok( ): # wait for kernel to initialize... time.sleep(0.3)
def init_config(cfg_dir): cfg_path = os.path.join(cfg_dir, 'rhizi-server.conf') cfg = RZ_Config.init_from_file(cfg_path) return cfg
def setUpClass(self): cfg = RZ_Config.init_from_file('res/etc/rhizi-server.conf') self.db_ctl = dbc.DB_Controller(cfg.neo4j_url) self.log = logging.getLogger('rhizi') self.log.addHandler(logging.StreamHandler())
def setUpClass(self): cfg = RZ_Config.generate_default() webapp = init_webapp(cfg, None) webapp.testing = True self.webapp = webapp
def setUpClass(self): cfg = RZ_Config.init_from_file('res/etc/rhizi-server.conf') self.log = init_log(cfg)