def main(suite=None): user = os.getenv("USER") web.config.db_parameters = dict(dbn="postgres", db="infogami_test", user=user, pw="") web.load() delegate.app.request("/") delegate._load() if not suite: main_module = __import__("__main__") suite = module_suite(main_module, sys.argv[1:] or None) result = runTests(suite) sys.exit(not result.wasSuccessful())
def main(suite=None): user = os.getenv('USER') web.config.db_parameters = dict(dbn='postgres', db='infogami_test', user=user, pw='') web.load() delegate.app.request('/') delegate._load() if not suite: main_module = __import__('__main__') suite = module_suite(main_module, sys.argv[1:] or None) result = runTests(suite) sys.exit(not result.wasSuccessful())
def _setup(): #if config.db_parameters is None: # raise Exception('infogami.config.db_parameters is not specified') if config.site is None: raise Exception('infogami.config.site is not specified') if config.bugfixer: web.webapi.internalerror = web.emailerrors(config.bugfixer, web.debugerror) web.internalerror = web.webapi.internalerror web.config.db_parameters = config.db_parameters web.config.db_printing = config.db_printing from infogami.utils import delegate delegate._load() # setup context etc. delegate.fakeload()
def _setup(): #if config.db_parameters is None: # raise Exception('infogami.config.db_parameters is not specified') if config.site is None: raise Exception('infogami.config.site is not specified') if config.bugfixer: web.webapi.internalerror = web.emailerrors(config.bugfixer, web.debugerror) web.internalerror = web.webapi.internalerror web.config.db_parameters = config.db_parameters web.config.db_printing = config.db_printing if config.get("debug", None) is not None: web.config.debug = config.debug from infogami.utils import delegate delegate._load() # setup context etc. delegate.fakeload()
def load_plugins(): config.plugin_path = ["openlibrary.plugins", ""] config.plugins = ["openlibrary", "worksearch", "upstream", "admin"] delegate._load()