From e941b5fba795db59f138656eecb29d19be6e9629 Mon Sep 17 00:00:00 2001 From: Natalie Schultz <90212258+nataliejschultz@users.noreply.github.com> Date: Thu, 21 Sep 2023 12:05:55 -0600 Subject: [PATCH] Constraining both results Changing to the first 71 characters + constraining the docker result as well. --- emission/individual_tests/TestNominatim.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/emission/individual_tests/TestNominatim.py b/emission/individual_tests/TestNominatim.py index 6d8bd0d3b..a427f9a75 100644 --- a/emission/individual_tests/TestNominatim.py +++ b/emission/individual_tests/TestNominatim.py @@ -101,9 +101,9 @@ def test_reverse_geocode(self): def test_nominatim_api(self): nominatim_url = "http://nominatim.openstreetmap.org/reverse?lat=41.832942092439694&lon=-71.41558148857203&format=json" nominatim_result_raw = requests.get(nominatim_url) - nominatim_result = nominatim_result_raw.json()['display_name'][0:30] + nominatim_result = nominatim_result_raw.json()['display_name'][0:70] # NOMINATIM_QUERY_URL = eco.NOMINATIM_QUERY_URL - docker_result = eco.Geocoder.reverse_geocode(41.832942092439694, -71.41558148857203) + docker_result = eco.Geocoder.reverse_geocode(41.832942092439694, -71.41558148857203)[0:70] print(docker_result) print(nominatim_result) self.assertEqual(nominatim_result, docker_result)