]> git.openstreetmap.org Git - nominatim.git/blobdiff - test/python/api/test_result_formatting_v1_reverse.py
enable CI tests for Ubuntu 24
[nominatim.git] / test / python / api / test_result_formatting_v1_reverse.py
index 6e94cf10b0a17f9f297d0d738eb1f2a1c1aad7ae..1248fa9e2d77e48598fbab96c17745db19ac2906 100644 (file)
@@ -1,8 +1,8 @@
-# SPDX-License-Identifier: GPL-2.0-only
+# SPDX-License-Identifier: GPL-3.0-or-later
 #
 # This file is part of Nominatim. (https://nominatim.org)
 #
-# Copyright (C) 2023 by the Nominatim developer community.
+# Copyright (C) 2024 by the Nominatim developer community.
 # For a full list of authors see the git log.
 """
 Tests for formatting reverse results for the V1 API.
@@ -15,8 +15,8 @@ import xml.etree.ElementTree as ET
 
 import pytest
 
-import nominatim.api.v1 as api_impl
-import nominatim.api as napi
+import nominatim_api.v1 as api_impl
+import nominatim_api as napi
 
 FORMATS = ['json', 'jsonv2', 'geojson', 'geocodejson', 'xml']
 
@@ -101,6 +101,7 @@ def test_format_reverse_with_address(fmt):
                                                     rank_address=10,
                                                     distance=0.0)
                                  ]))
+    reverse.localize(napi.Locales())
 
     raw = api_impl.format_result(napi.ReverseResults([reverse]), fmt,
                                  {'addressdetails': True})
@@ -164,6 +165,8 @@ def test_format_reverse_geocodejson_special_parts():
                                                     distance=0.0)
                                  ]))
 
+    reverse.localize(napi.Locales())
+
     raw = api_impl.format_result(napi.ReverseResults([reverse]), 'geocodejson',
                                  {'addressdetails': True})