mirror of
https://github.com/osm-search/Nominatim.git
synced 2026-02-15 10:57:58 +00:00
port code to psycopg3
This commit is contained in:
@@ -13,8 +13,6 @@ from pathlib import Path
|
||||
import pytest
|
||||
import pytest_asyncio
|
||||
|
||||
import psycopg2.extras
|
||||
|
||||
from fake_adaptor import FakeAdaptor, FakeError, FakeResponse
|
||||
|
||||
import nominatim_api.v1.server_glue as glue
|
||||
@@ -31,7 +29,6 @@ class TestDeletableEndPoint:
|
||||
|
||||
@pytest.fixture(autouse=True)
|
||||
def setup_deletable_table(self, temp_db_cursor, table_factory, temp_db_with_extensions):
|
||||
psycopg2.extras.register_hstore(temp_db_cursor)
|
||||
table_factory('import_polygon_delete',
|
||||
definition='osm_id bigint, osm_type char(1), class text, type text',
|
||||
content=[(345, 'N', 'boundary', 'administrative'),
|
||||
|
||||
@@ -14,8 +14,6 @@ from pathlib import Path
|
||||
import pytest
|
||||
import pytest_asyncio
|
||||
|
||||
import psycopg2.extras
|
||||
|
||||
from fake_adaptor import FakeAdaptor, FakeError, FakeResponse
|
||||
|
||||
import nominatim_api.v1.server_glue as glue
|
||||
@@ -32,8 +30,6 @@ class TestPolygonsEndPoint:
|
||||
|
||||
@pytest.fixture(autouse=True)
|
||||
def setup_deletable_table(self, temp_db_cursor, table_factory, temp_db_with_extensions):
|
||||
psycopg2.extras.register_hstore(temp_db_cursor)
|
||||
|
||||
self.now = dt.datetime.now()
|
||||
self.recent = dt.datetime.now() - dt.timedelta(days=3)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user