X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/2bab0ca060ff224091b20a0ac808a3febaba04b1..290c22a153114ca623fe350eaf53d3780513290e:/test/python/api/search/test_icu_query_analyzer.py?ds=sidebyside diff --git a/test/python/api/search/test_icu_query_analyzer.py b/test/python/api/search/test_icu_query_analyzer.py index 8e5480fc..ac4bcbb7 100644 --- a/test/python/api/search/test_icu_query_analyzer.py +++ b/test/python/api/search/test_icu_query_analyzer.py @@ -7,8 +7,6 @@ """ Tests for query analyzer for ICU tokenizer. """ -from pathlib import Path - import pytest import pytest_asyncio @@ -40,10 +38,9 @@ async def conn(table_factory): table_factory('word', definition='word_id INT, word_token TEXT, type TEXT, word TEXT, info JSONB') - 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