def settings(): """Default app settings (conf/test.ini).""" settings = get_appsettings('conf/test.ini') if 'TEST_DATABASE_URL' in os.environ: settings['sqlalchemy.url'] = normalize_database_url( os.environ['TEST_DATABASE_URL']) return settings
def settings(): """ Default app settings (conf/test.ini). :return: a list of loaded settings """ loaded_settings = get_appsettings('conf/test.ini') if 'TEST_DATABASE_URL' in os.environ: loaded_settings['sqlalchemy.url'] = normalize_database_url(os.environ['TEST_DATABASE_URL']) return loaded_settings
def settings(): """ Default app settings (conf/test.ini). :return: a list of loaded settings """ loaded_settings = get_appsettings('conf/test.ini') if 'TEST_DATABASE_URL' in os.environ: loaded_settings['sqlalchemy.url'] = normalize_database_url( os.environ['TEST_DATABASE_URL']) return loaded_settings
def get_database_url(): if 'DATABASE_URL' in os.environ: return normalize_database_url(os.environ['DATABASE_URL']) return config.get_main_option("sqlalchemy.url")