コード例 #1
0
ファイル: complete_db_test.py プロジェクト: wlredeye/imposm3
def test_deploy_and_revert_deploy():
    """Revert deploy succeeds"""
    assert not t.table_exists('osm_roads', schema=t.TEST_SCHEMA_IMPORT)
    assert t.table_exists('osm_roads', schema=t.TEST_SCHEMA_PRODUCTION)
    assert not t.table_exists('osm_roads', schema=t.TEST_SCHEMA_BACKUP)

    # import again to have a new import schema
    t.imposm3_import(t.db_conf, './build/complete_db.pbf', mapping_file)
    assert t.table_exists('osm_roads', schema=t.TEST_SCHEMA_IMPORT)

    t.imposm3_deploy(t.db_conf, mapping_file)
    assert not t.table_exists('osm_roads', schema=t.TEST_SCHEMA_IMPORT)
    assert t.table_exists('osm_roads', schema=t.TEST_SCHEMA_PRODUCTION)
    assert t.table_exists('osm_roads', schema=t.TEST_SCHEMA_BACKUP)

    t.imposm3_revert_deploy(t.db_conf, mapping_file)
    assert t.table_exists('osm_roads', schema=t.TEST_SCHEMA_IMPORT)
    assert t.table_exists('osm_roads', schema=t.TEST_SCHEMA_PRODUCTION)
    assert not t.table_exists('osm_roads', schema=t.TEST_SCHEMA_BACKUP)
コード例 #2
0
ファイル: complete_db_test.py プロジェクト: vmx/imposm3
def test_deploy_and_revert_deploy():
    """Revert deploy succeeds"""
    assert not t.table_exists('osm_roads', schema=t.TEST_SCHEMA_IMPORT)
    assert t.table_exists('osm_roads', schema=t.TEST_SCHEMA_PRODUCTION)
    assert not t.table_exists('osm_roads', schema=t.TEST_SCHEMA_BACKUP)

    # import again to have a new import schema
    t.imposm3_import(t.db_conf, './build/complete_db.pbf', mapping_file)
    assert t.table_exists('osm_roads', schema=t.TEST_SCHEMA_IMPORT)

    t.imposm3_deploy(t.db_conf, mapping_file)
    assert not t.table_exists('osm_roads', schema=t.TEST_SCHEMA_IMPORT)
    assert t.table_exists('osm_roads', schema=t.TEST_SCHEMA_PRODUCTION)
    assert t.table_exists('osm_roads', schema=t.TEST_SCHEMA_BACKUP)

    t.imposm3_revert_deploy(t.db_conf, mapping_file)
    assert t.table_exists('osm_roads', schema=t.TEST_SCHEMA_IMPORT)
    assert t.table_exists('osm_roads', schema=t.TEST_SCHEMA_PRODUCTION)
    assert not t.table_exists('osm_roads', schema=t.TEST_SCHEMA_BACKUP)
コード例 #3
0
ファイル: complete_db_test.py プロジェクト: wlredeye/imposm3
def test_import():
    """Import succeeds"""
    t.drop_schemas()
    assert not t.table_exists('osm_roads', schema=t.TEST_SCHEMA_IMPORT)
    t.imposm3_import(t.db_conf, './build/complete_db.pbf', mapping_file)
    assert t.table_exists('osm_roads', schema=t.TEST_SCHEMA_IMPORT)
コード例 #4
0
ファイル: complete_db_test.py プロジェクト: vmx/imposm3
def test_import():
    """Import succeeds"""
    t.drop_schemas()
    assert not t.table_exists('osm_roads', schema=t.TEST_SCHEMA_IMPORT)
    t.imposm3_import(t.db_conf, './build/complete_db.pbf', mapping_file)
    assert t.table_exists('osm_roads', schema=t.TEST_SCHEMA_IMPORT)