X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/c314a3092c5b51c7782015f6fa9ac093b46fa174..3734f1d0b84c642ba89b5a4c39bac845f5627be7:/test/python/api/search/test_legacy_query_analyzer.py?ds=inline diff --git a/test/python/api/search/test_legacy_query_analyzer.py b/test/python/api/search/test_legacy_query_analyzer.py index 92de8706..7a4d41d3 100644 --- a/test/python/api/search/test_legacy_query_analyzer.py +++ b/test/python/api/search/test_legacy_query_analyzer.py @@ -7,8 +7,6 @@ """ Tests for query analyzer for legacy tokenizer. """ -from pathlib import Path - import pytest import pytest_asyncio @@ -74,10 +72,9 @@ async def conn(table_factory, temp_db_cursor): temp_db_cursor.execute("""CREATE OR REPLACE FUNCTION make_standard_name(name TEXT) RETURNS TEXT AS $$ SELECT lower(name); $$ LANGUAGE SQL;""") - api = NominatimAPIAsync(Path('/invalid'), {}) - async with api.begin() as conn: - yield conn - await api.close() + async with NominatimAPIAsync() as api: + async with api.begin() as conn: + yield conn @pytest.mark.asyncio