def setUp(self) -> None: self._set_logger() DepotManager._clear() settings = plaster.get_settings(self.config_uri, self.config_section) self.settings = self.override_settings(settings) hapic.reset_context() self.connect_database(create_tables=True) self.app_config = CFG(self.settings) self.app_config.configure_filedepot() self.init_database(self.settings) DepotManager._clear() self.run_app()
def hapic(): from tracim_backend.extensions import hapic as hapic_static # INFO - G.M - 2019-03-19 - Reset all hapic context: PyramidContext # and controllers hapic_static.reset_context() # TODO - G.M - 2019-03-19 - Replace this code by something better, see # https://github.com/algoo/hapic/issues/144 hapic_static._controllers = [] yield hapic_static hapic_static.reset_context() # TODO - G.M - 2019-03-19 - Replace this code by something better, see # https://github.com/algoo/hapic/issues/144 hapic_static._controllers = []
def setUp(self) -> None: self._set_logger() DepotManager._clear() settings = plaster.get_settings(self.config_uri, self.config_section) self.settings = self.override_settings(settings) # INFO - G.M - 2019-03-19 - Reset all hapic context: PyramidContext # and controllers hapic.reset_context() # TODO - G.M - 2019-03-19 - Replace this code by something better, see # https://github.com/algoo/hapic/issues/144 hapic._controllers = [] self.app_config = CFG(self.settings) # type: CFG self.app_config = self.override_app_config(self.app_config) self.app_config.configure_filedepot() self.connect_database(create_tables=True) self.init_database() DepotManager._clear() self.run_app()