diff --git a/emission/individual_tests/TestNominatim.py b/emission/individual_tests/TestNominatim.py index fa51f239b..a7f75b958 100644 --- a/emission/individual_tests/TestNominatim.py +++ b/emission/individual_tests/TestNominatim.py @@ -29,7 +29,7 @@ def setUp(self): write_ts = 1694344333 data = {'source': 'FakeTripGenerator','location': {'type': 'Point', 'coordinates': [-71.4128343, 41.8239891]}} fake_place = ecwe.Entry.create_fake_entry(fake_id, key, data, write_ts) - return fake_place + self.fake_place = fake_place #When a nominatim service is called, we set the value of the NOMINATIM_QUERY_URL environment variable in nominatim.py and re-load the module. def nominatim(service): @@ -60,7 +60,7 @@ def test_geofabrik_and_nominatim(self): #Checks the display name generated by get_filtered_place in clean_and_resample.py, which creates a cleaned place from the fake place # and reverse geocodes with the coordinates. def test_get_filtered_place(self): - fake_place_raw = self.setUp() + fake_place_raw = self.fake_place fake_place_data = clean.get_filtered_place(fake_place_raw).__getattr__("data") actual_result = fake_place_data.__getattr__("display_name") expected_result = "Dorrance Street, Providence" diff --git a/emission/integrationTests/docker-compose.yml b/emission/integrationTests/docker-compose.yml index e5eb2635e..4ee29abd3 100644 --- a/emission/integrationTests/docker-compose.yml +++ b/emission/integrationTests/docker-compose.yml @@ -11,7 +11,7 @@ services: - GFBK_KEY=$GFBK_KEY - GEOFABRIK_QUERY_URL=https://geocoding.geofabrik.de/$GFBK_KEY - OPENSTREETMAP_QUERY_URL=https://nominatim.openstreetmap.org - - NOMINATIM_CONTAINER_URL=http://rhodeisland-nominatim + - NOMINATIM_CONTAINER_URL=http://rhodeisland-nominatim:8080 volumes: # specify the host directory where the source code should live @@ -41,6 +41,8 @@ services: entrypoint: /app/start.sh image: nataliejschultz/rhodeisland-image:4.0 container_name: rhodeisland-nominatim + ports: + - "8080:8080" deploy: replicas: 1 restart_policy: