示例#1
0
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())
示例#2
0
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())
示例#3
0
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()
示例#4
0
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()
示例#5
0
def load_plugins():
    config.plugin_path = ["openlibrary.plugins", ""]
    config.plugins = ["openlibrary", "worksearch", "upstream", "admin"]

    delegate._load()
示例#6
0
def load_plugins():
    config.plugin_path = ["openlibrary.plugins", ""]
    config.plugins = ["openlibrary", "worksearch", "upstream", "admin"]
    
    delegate._load()