X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/3206bf59df0213d24bd3e11df7dd2abaebf89911..73953cbac95847740339d7a5ee3c0e5f142d93c5:/test/python/test_db_async_connection.py?ds=inline 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 - -