def main(global_config, **settings): # This function is a 'paste.app_factory' and returns a WSGI # application. from kotti.resources import initialize_sql config = base_configure(global_config, **settings) engine = engine_from_config(config.registry.settings, 'sqlalchemy.') initialize_sql(engine) return config.make_wsgi_app()
def _initTestingDB(): from sqlalchemy import create_engine from kotti.resources import initialize_sql database_url = testing_db_url() session = initialize_sql(create_engine(database_url), drop_all=True) return session
def _init_testing_db(): from sqlalchemy import create_engine from kotti import get_settings from kotti.resources import initialize_sql database_url = testing_db_url() get_settings()["sqlalchemy.url"] = database_url session = initialize_sql(create_engine(database_url), drop_all=True) return session
def _initTestingDB(): from sqlalchemy import create_engine session = initialize_sql(create_engine('sqlite://')) return session