def schema(engine):
    current_directory = os.path.dirname(os.path.realpath(__file__))
    exec_sql_from_file('fixtures/test_export_osmnames.sql.dump', cwd=current_directory)
    create_functions()

    if not os.path.exists('/tmp/osmnames/export/'):
        os.makedirs('/tmp/osmnames/export/')
Beispiel #2
0
def _init_and_clear_database():
    # creates database if necessary
    init_database()

    exec_sql("DROP OWNED BY osm_test")

    # prepare schema for tests
    current_directory = os.path.dirname(os.path.realpath(__file__))
    exec_sql_from_file('helpers/schema.sql.dump', cwd=current_directory)
    exec_sql_from_file('helpers/functions.sql', cwd=current_directory)
    export_osmnames.create_functions()

    # necessary for export tests
    if not os.path.exists('/tmp/osmnames/export/'):
        os.makedirs('/tmp/osmnames/export/')
Beispiel #3
0
def _init_and_clear_database():
    # creates database if necessary
    init_database()

    exec_sql("DROP OWNED BY osm_test")

    # prepare schema for tests
    current_directory = os.path.dirname(os.path.realpath(__file__))
    exec_sql_from_file('helpers/schema.sql.dump', cwd=current_directory)
    exec_sql_from_file('helpers/functions.sql', cwd=current_directory)
    export_osmnames.create_functions()

    # necessary for export tests
    if not os.path.exists('/tmp/osmnames/export/'):
        os.makedirs('/tmp/osmnames/export/')
Beispiel #4
0
def schema(engine):
    current_directory = os.path.dirname(os.path.realpath(__file__))
    exec_sql_from_file('fixtures/test_export_osmnames.sql.dump', cwd=current_directory)
    create_functions()