mirror of
https://github.com/osm-search/Nominatim.git
synced 2026-02-16 05:18:00 +00:00
Integrated OSM views into importance computation
This commit is contained in:
committed by
Sarah Hoffmann
parent
ac467c7a2d
commit
0ab0f0ea44
@@ -69,7 +69,7 @@ class TestCliImportWithDb:
|
||||
assert cf_mock.called > 1
|
||||
|
||||
for mock in mocks:
|
||||
assert mock.called > 0, "Mock '{}' not called".format(mock.func_name)
|
||||
assert mock.called == 1, "Mock '{}' not called".format(mock.func_name)
|
||||
|
||||
|
||||
def test_import_continue_load_data(self, mock_func_factory):
|
||||
|
||||
@@ -32,7 +32,7 @@ class TestRefresh:
|
||||
func_mock = mock_func_factory(nominatim.tools.refresh, func)
|
||||
|
||||
assert self.call_nominatim('refresh', '--' + command) == 0
|
||||
assert func_mock.called > 0
|
||||
assert func_mock.called == 1
|
||||
|
||||
|
||||
def test_refresh_word_count(self):
|
||||
|
||||
@@ -38,6 +38,7 @@ def test_recompute_importance(placex_table, table_factory, temp_db_conn, temp_db
|
||||
temp_db_cursor.execute("""CREATE OR REPLACE FUNCTION compute_importance(extratags HSTORE,
|
||||
country_code varchar(2),
|
||||
osm_type varchar(1), osm_id BIGINT,
|
||||
centroid GEOMETRY,
|
||||
OUT importance FLOAT,
|
||||
OUT wikipedia TEXT)
|
||||
AS $$ SELECT 0.1::float, 'foo'::text $$ LANGUAGE SQL""")
|
||||
|
||||
Reference in New Issue
Block a user