X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/efafa5271957fb54b356ec1c90e8613f14de40d4..67664406da6c2fdf7753d64be0d5ca79a5599735:/test/bdd/steps/place_inserter.py diff --git a/test/bdd/steps/place_inserter.py b/test/bdd/steps/place_inserter.py index 9cf3f3d3..c033ac17 100644 --- a/test/bdd/steps/place_inserter.py +++ b/test/bdd/steps/place_inserter.py @@ -83,7 +83,7 @@ class PlaceColumn: self._add_hstore('address', 'country', value) def _set_key_geometry(self, value): - self.geometry = self.context.osm.parse_geometry(value, self.context.scene) + self.geometry = self.context.osm.parse_geometry(value) assert self.geometry is not None, "Bad geometry: {}".format(value) def _add_hstore(self, column, key, value): @@ -92,6 +92,12 @@ class PlaceColumn: else: self.columns[column] = {key: value} + def db_delete(self, cursor): + """ Issue a delete for the given OSM object. + """ + cursor.execute('DELETE FROM place WHERE osm_type = %s and osm_id = %s', + (self.columns['osm_type'] , self.columns['osm_id'])) + def db_insert(self, cursor): """ Insert the collected data into the database. """