]> git.openstreetmap.org Git - nominatim.git/blobdiff - test/python/test_cli.py
test: replace raw execute() with fixture code where possible
[nominatim.git] / test / python / test_cli.py
index 27ea0d5dbaea84958408d3b40b0a08ccd0517171..348ed9a30fdfef193f653b664423bd3c4a00157b 100644 (file)
@@ -244,9 +244,9 @@ def test_add_data_command(mock_run_legacy, name, oid):
                           (['--boundaries-only'], 1, 0),
                           (['--no-boundaries'], 0, 1),
                           (['--boundaries-only', '--no-boundaries'], 0, 0)])
-def test_index_command(mock_func_factory, temp_db_cursor, tokenizer_mock,
+def test_index_command(mock_func_factory, table_factory, tokenizer_mock,
                        params, do_bnds, do_ranks):
-    temp_db_cursor.execute("CREATE TABLE import_status (indexed bool)")
+    table_factory('import_status', 'indexed bool')
     bnd_mock = mock_func_factory(nominatim.indexer.indexer.Indexer, 'index_boundaries')
     rank_mock = mock_func_factory(nominatim.indexer.indexer.Indexer, 'index_by_rank')