Skip to content

Commit

Permalink
Constraining both results
Browse files Browse the repository at this point in the history
Changing to the first 71 characters + constraining the docker result as well.
  • Loading branch information
nataliejschultz committed Sep 21, 2023
1 parent 7a1974f commit e941b5f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions emission/individual_tests/TestNominatim.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit e941b5f

Please sign in to comment.