X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/5feece64c1c8125ff44cfbbdc054197cc1c57df7..1e9f37ab82db1758235bedf83c659693f4ca6c3e:/test/python/test_db_async_connection.py diff --git a/test/python/test_db_async_connection.py b/test/python/test_db_async_connection.py index 330b86f7..7398eac3 100644 --- a/test/python/test_db_async_connection.py +++ b/test/python/test_db_async_connection.py @@ -6,15 +6,14 @@ import concurrent.futures import pytest import psycopg2 -from psycopg2.extras import wait_select from nominatim.db.async_connection import DBConnection, DeadlockHandler @pytest.fixture def conn(temp_db): - with closing(DBConnection('dbname=' + temp_db)) as c: - yield c + with closing(DBConnection('dbname=' + temp_db)) as connection: + yield connection @pytest.fixture @@ -106,5 +105,3 @@ def test_deadlock(simple_conns): future.result() assert len(deadlock_check) == 1 - -