X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/5a245e33e08d3b0b825cb8f9b47214e1b221118e..4cc788f69e1191d2dd985aeac143597566529f24:/test/python/db/test_status.py
diff --git a/test/python/db/test_status.py b/test/python/db/test_status.py
index 77135a8c..462b8e3d 100644
--- a/test/python/db/test_status.py
+++ b/test/python/db/test_status.py
@@ -2,7 +2,7 @@
#
# This file is part of Nominatim. (https://nominatim.org)
#
-# Copyright (C) 2024 by the Nominatim developer community.
+# Copyright (C) 2025 by the Nominatim developer community.
# For a full list of authors see the git log.
"""
Tests for status table manipulation.
@@ -19,7 +19,8 @@ OSM_NODE_DATA = """\
-"""
+""" # noqa
+
def iso_date(date):
return dt.datetime.strptime(date, nominatim_db.db.status.ISODATE_FORMAT)\
@@ -43,7 +44,8 @@ def test_compute_database_date_from_osm2pgsql(table_factory, temp_db_conn, offli
def test_compute_database_date_from_osm2pgsql_nodata(table_factory, temp_db_conn):
table_factory('osm2pgsql_properties', 'property TEXT, value TEXT')
- with pytest.raises(UsageError, match='Cannot determine database date from data in offline mode'):
+ with pytest.raises(UsageError,
+ match='Cannot determine database date from data in offline mode'):
nominatim_db.db.status.compute_database_date(temp_db_conn, offline=True)
@@ -56,6 +58,7 @@ def test_compute_database_date_valid(monkeypatch, place_row, temp_db_conn):
place_row(osm_type='N', osm_id=45673)
requested_url = []
+
def mock_url(url):
requested_url.append(url)
return OSM_NODE_DATA
@@ -72,6 +75,7 @@ def test_compute_database_broken_api(monkeypatch, place_row, temp_db_conn):
place_row(osm_type='N', osm_id=45673)
requested_url = []
+
def mock_url(url):
requested_url.append(url)
return '