示例#1
0
def test_analyse_indexing_with_place_id(temp_db_conn, temp_db_cursor):
    temp_db_cursor.execute("INSERT INTO placex (place_id) VALUES(12345)")

    admin.analyse_indexing(temp_db_conn, place_id=12345)
示例#2
0
def test_analyse_indexing_with_osm_id(temp_db_conn, temp_db_cursor):
    temp_db_cursor.execute("""INSERT INTO placex (place_id, osm_type, osm_id)
                              VALUES(9988, 'N', 10000)""")

    admin.analyse_indexing(temp_db_conn, osm_id='N10000')
示例#3
0
def test_analyse_indexing_unknown_osmid(temp_db_conn):
    with pytest.raises(UsageError):
        admin.analyse_indexing(temp_db_conn, osm_id='W12345674')
示例#4
0
def test_analyse_indexing_bad_osmid(temp_db_conn, oid):
    with pytest.raises(UsageError):
        admin.analyse_indexing(temp_db_conn, osm_id=oid)
示例#5
0
def test_analyse_indexing_no_objects(temp_db_conn):
    with pytest.raises(UsageError):
        admin.analyse_indexing(temp_db_conn)
示例#6
0
def test_analyse_indexing_unknown_osmid(db):
    with pytest.raises(UsageError):
        admin.analyse_indexing(db, osm_id='W12345674')
示例#7
0
def test_analyse_indexing_no_objects(db):
    with pytest.raises(UsageError):
        admin.analyse_indexing(db)