X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/5a245e33e08d3b0b825cb8f9b47214e1b221118e..4cc788f69e1191d2dd985aeac143597566529f24:/test/python/db/test_connection.py diff --git a/test/python/db/test_connection.py b/test/python/db/test_connection.py index a8b5d677..19b945fd 100644 --- a/test/python/db/test_connection.py +++ b/test/python/db/test_connection.py @@ -2,7 +2,7 @@ # # This file is part of Nominatim. (https://nominatim.org) # -# Copyright (C) 2024 by the Nominatim developer community. +# Copyright (C) 2025 by the Nominatim developer community. # For a full list of authors see the git log. """ Tests for specialised connection and cursor classes. @@ -12,6 +12,7 @@ import psycopg import nominatim_db.db.connection as nc + @pytest.fixture def db(dsn): with nc.connect(dsn) as conn: @@ -36,6 +37,7 @@ def test_has_column(db, table_factory, name, result): assert nc.table_has_column(db, 'stuff', name) == result + def test_connection_index_exists(db, table_factory, temp_db_cursor): assert not nc.index_exists(db, 'some_index') @@ -76,6 +78,7 @@ def test_drop_table_non_existing_force(db): with pytest.raises(psycopg.ProgrammingError, match='.*does not exist.*'): nc.drop_tables(db, 'dfkjgjriogjigjgjrdghehtre', if_exists=False) + def test_connection_server_version_tuple(db): ver = nc.server_version_tuple(db)