X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/42cd021d0406970d6c96c029ab83d08dfbe02792..3493d317e4a22dd41db4a512d35a310275d167e3:/test/bdd/steps/steps_db_ops.py diff --git a/test/bdd/steps/steps_db_ops.py b/test/bdd/steps/steps_db_ops.py index e02cad8f..98ed6e1c 100644 --- a/test/bdd/steps/steps_db_ops.py +++ b/test/bdd/steps/steps_db_ops.py @@ -93,12 +93,17 @@ def add_data_to_planet_ways(context): def import_and_index_data_from_place_table(context): """ Import data previously set up in the place table. """ - context.nominatim.run_nominatim('refresh', '--functions') context.nominatim.run_nominatim('import', '--continue', 'load-data', - '--index-noanalyse', '-q') + '--index-noanalyse', '-q', + '--offline') check_database_integrity(context) + # Remove the output of the input, when all was right. Otherwise it will be + # output when there are errors that had nothing to do with the import + # itself. + context.log_capture.buffer.clear() + @when("updating places") def update_place_table(context): """ Update the place table with the given data. Also runs all triggers @@ -112,6 +117,12 @@ def update_place_table(context): context.nominatim.reindex_placex(context.db) check_database_integrity(context) + # Remove the output of the input, when all was right. Otherwise it will be + # output when there are errors that had nothing to do with the import + # itself. + context.log_capture.buffer.clear() + + @when("updating postcodes") def update_postcodes(context): """ Rerun the calculation of postcodes. @@ -266,7 +277,7 @@ def check_word_table_for_postcodes(context, exclude, postcodes): plist.sort() with context.db.cursor(cursor_factory=psycopg2.extras.DictCursor) as cur: - if nctx.tokenizer == 'icu': + if nctx.tokenizer != 'legacy': cur.execute("SELECT word FROM word WHERE type = 'P' and word = any(%s)", (plist,)) else: