def app(): # this is to make sure sqlite is initialized # for every unittest from indexd import default_settings reload(default_settings) yield get_app() try: clear_database() except: pass
def app(): # this is to make sure sqlite is initialized # for every unittest from indexd import default_settings reload(default_settings) yield get_app() try: os.remove('auth.sq3') os.remove('index.sq3') os.remove('alias.sq3') except: pass
from indexd import get_app import os os.environ["INDEXD_SETTINGS"] = "/var/www/indexd/" application = get_app()
def run_indexd(port): app = get_app() app.run(host="localhost", port=port, debug=False)