X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/3742fa2929619a4c54a50d3e79e0eeadb4d6ca6f..3acd7df5c44345ad85aa97a92d582c60a4eba240:/test/python/db/test_connection.py?ds=inline diff --git a/test/python/db/test_connection.py b/test/python/db/test_connection.py index 9f1442f3..a8b5d677 100644 --- a/test/python/db/test_connection.py +++ b/test/python/db/test_connection.py @@ -8,7 +8,7 @@ Tests for specialised connection and cursor classes. """ import pytest -import psycopg2 +import psycopg import nominatim_db.db.connection as nc @@ -73,7 +73,7 @@ def test_drop_many_tables(db, table_factory): def test_drop_table_non_existing_force(db): - with pytest.raises(psycopg2.ProgrammingError, match='.*does not exist.*'): + with pytest.raises(psycopg.ProgrammingError, match='.*does not exist.*'): nc.drop_tables(db, 'dfkjgjriogjigjgjrdghehtre', if_exists=False) def test_connection_server_version_tuple(db):