mirror of
https://github.com/osm-search/Nominatim.git
synced 2026-02-15 02:47:59 +00:00
test: use table_rows() and execute_values() where possible
Some uses of scalar() could also be replaced with convenience functions from the word table mock.
This commit is contained in:
@@ -22,5 +22,5 @@ def test_refresh_import_wikipedia(dsn, table_factory, temp_db_cursor, replace):
|
||||
# use the small wikipedia file for the API testdb
|
||||
assert 0 == refresh.import_wikipedia_articles(dsn, TEST_DIR / 'testdb')
|
||||
|
||||
assert temp_db_cursor.scalar('SELECT count(*) FROM wikipedia_article') > 0
|
||||
assert temp_db_cursor.scalar('SELECT count(*) FROM wikipedia_redirect') > 0
|
||||
assert temp_db_cursor.table_rows('wikipedia_article') > 0
|
||||
assert temp_db_cursor.table_rows('wikipedia_redirect') > 0
|
||||
|
||||
Reference in New Issue
Block a user