X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/d2c56f9f96bce00d9d9309ddf230f825916eccae..418f381b492cc9c0f3ede008e72e1d2eb1a611a8:/test/python/api/test_api_details.py diff --git a/test/python/api/test_api_details.py b/test/python/api/test_api_details.py index 101dfd13..ca14b93c 100644 --- a/test/python/api/test_api_details.py +++ b/test/python/api/test_api_details.py @@ -150,17 +150,20 @@ def test_lookup_placex_with_address_details(apiobj): category=('highway', 'residential'), names={'name': 'Street'}, extratags={}, admin_level=15, fromarea=True, isaddress=True, - rank_address=26, distance=0.0), + rank_address=26, distance=0.0, + local_name='Street'), napi.AddressLine(place_id=1000, osm_object=('N', 3333), category=('place', 'suburb'), names={'name': 'Smallplace'}, extratags={}, admin_level=13, fromarea=False, isaddress=True, - rank_address=23, distance=0.0034), + rank_address=23, distance=0.0034, + local_name='Smallplace'), napi.AddressLine(place_id=1001, osm_object=('N', 3334), category=('place', 'city'), names={'name': 'Bigplace'}, extratags={}, admin_level=15, fromarea=True, isaddress=True, - rank_address=16, distance=0.0), + rank_address=16, distance=0.0, + local_name='Bigplace'), napi.AddressLine(place_id=None, osm_object=None, category=('place', 'country_code'), names={'ref': 'pl'}, extratags={}, @@ -337,26 +340,24 @@ def test_lookup_osmline_with_address_details(apiobj): result = apiobj.api.details(napi.PlaceID(9000), address_details=True) assert result.address_rows == [ - napi.AddressLine(place_id=None, osm_object=None, - category=('place', 'house_number'), - names={'ref': '2'}, extratags={}, - admin_level=None, fromarea=True, isaddress=True, - rank_address=28, distance=0.0), napi.AddressLine(place_id=332, osm_object=('W', 4), category=('highway', 'residential'), names={'name': 'Street'}, extratags={}, admin_level=15, fromarea=True, isaddress=True, - rank_address=26, distance=0.0), + rank_address=26, distance=0.0, + local_name='Street'), napi.AddressLine(place_id=1000, osm_object=('N', 3333), category=('place', 'suburb'), names={'name': 'Smallplace'}, extratags={}, admin_level=13, fromarea=False, isaddress=True, - rank_address=23, distance=0.0034), + rank_address=23, distance=0.0034, + local_name='Smallplace'), napi.AddressLine(place_id=1001, osm_object=('N', 3334), category=('place', 'city'), names={'name': 'Bigplace'}, extratags={}, admin_level=15, fromarea=True, isaddress=True, - rank_address=16, distance=0.0), + rank_address=16, distance=0.0, + local_name='Bigplace'), napi.AddressLine(place_id=None, osm_object=None, category=('place', 'country_code'), names={'ref': 'pl'}, extratags={}, @@ -437,26 +438,24 @@ def test_lookup_tiger_with_address_details(apiobj): result = apiobj.api.details(napi.PlaceID(9000), address_details=True) assert result.address_rows == [ - napi.AddressLine(place_id=None, osm_object=None, - category=('place', 'house_number'), - names={'ref': '2'}, extratags={}, - admin_level=None, fromarea=True, isaddress=True, - rank_address=28, distance=0.0), napi.AddressLine(place_id=332, osm_object=('W', 4), category=('highway', 'residential'), names={'name': 'Street'}, extratags={}, admin_level=15, fromarea=True, isaddress=True, - rank_address=26, distance=0.0), + rank_address=26, distance=0.0, + local_name='Street'), napi.AddressLine(place_id=1000, osm_object=('N', 3333), category=('place', 'suburb'), names={'name': 'Smallplace'}, extratags={}, admin_level=13, fromarea=False, isaddress=True, - rank_address=23, distance=0.0034), + rank_address=23, distance=0.0034, + local_name='Smallplace'), napi.AddressLine(place_id=1001, osm_object=('N', 3334), category=('place', 'city'), names={'name': 'Bigplace'}, extratags={}, admin_level=15, fromarea=True, isaddress=True, - rank_address=16, distance=0.0), + rank_address=16, distance=0.0, + local_name='Bigplace'), napi.AddressLine(place_id=None, osm_object=None, category=('place', 'country_code'), names={'ref': 'us'}, extratags={}, @@ -532,21 +531,24 @@ def test_lookup_postcode_with_address_details(apiobj): result = apiobj.api.details(napi.PlaceID(9000), address_details=True) assert result.address_rows == [ + napi.AddressLine(place_id=9000, osm_object=None, + category=('place', 'postcode'), + names={'ref': '34 425'}, extratags={}, + admin_level=15, fromarea=True, isaddress=True, + rank_address=25, distance=0.0, + local_name='34 425'), napi.AddressLine(place_id=332, osm_object=('N', 3333), category=('place', 'suburb'), names={'name': 'Smallplace'}, extratags={}, admin_level=13, fromarea=True, isaddress=True, - rank_address=23, distance=0.0), + rank_address=23, distance=0.0, + local_name='Smallplace'), napi.AddressLine(place_id=1001, osm_object=('N', 3334), category=('place', 'city'), names={'name': 'Bigplace'}, extratags={}, admin_level=15, fromarea=True, isaddress=True, - rank_address=16, distance=0.0), - napi.AddressLine(place_id=None, osm_object=None, - category=('place', 'postcode'), - names={'ref': '34 425'}, extratags={}, - admin_level=None, fromarea=False, isaddress=True, - rank_address=5, distance=0.0), + rank_address=16, distance=0.0, + local_name='Bigplace'), napi.AddressLine(place_id=None, osm_object=None, category=('place', 'country_code'), names={'ref': 'gb'}, extratags={},