use information from tokenizer to determine street vs. place address

So far the SQL logic used the information from the address field
to determine if an address is attached to a street or place.
This changes the logic to use the information provided in the
token_info. This allows sanitizers to enforce a certain parenting
without changing the visible address information.
This commit is contained in:
Sarah Hoffmann
2023-06-30 11:08:25 +02:00
parent 2755ebe883
commit 645ea5a057
6 changed files with 45 additions and 7 deletions

View File

@@ -523,7 +523,7 @@ class TestPlaceAddress:
def test_process_place_nonexisting_street(self):
info = self.process_address(street='Grand Road')
assert 'street' not in info
assert info['street'] == '{}'
def test_process_place_multiple_street_tags(self):
@@ -538,7 +538,7 @@ class TestPlaceAddress:
def test_process_place_street_empty(self):
info = self.process_address(street='🜵')
assert 'street' not in info
assert info['street'] == '{}'
def test_process_place_street_from_cache(self):