allow None and str for project_dir in NominatimAPI init

This commit is contained in:
Sarah Hoffmann
2024-08-22 22:49:12 +02:00
parent f535340d5a
commit 7f11de0db9
8 changed files with 45 additions and 50 deletions

View File

@@ -7,8 +7,6 @@
"""
Tests for query analyzer for legacy tokenizer.
"""
from pathlib import Path
import pytest
import pytest_asyncio
@@ -74,7 +72,7 @@ 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;""")
async with NominatimAPIAsync(Path('/invalid'), {}) as api:
async with NominatimAPIAsync(environ={}) as api:
async with api.begin() as conn:
yield conn