diff --git a/backend/geonature/tests/test_synthese.py b/backend/geonature/tests/test_synthese.py index dd226acac7..98305c4032 100644 --- a/backend/geonature/tests/test_synthese.py +++ b/backend/geonature/tests/test_synthese.py @@ -460,16 +460,21 @@ def test_filter_cor_observers(self, users, synthese_data): # le requete doit etre OK marlgré la geom NULL assert response.status_code == 200 - def test_get_observations_for_web_param_column_frontend(self, app, users, synthese_data): + @pytest.mark.parametrize( + "additionnal_column", + [("altitude_min"), ("count_min_max"), ("nom_vern_or_lb_nom")], + ) + def test_get_observations_for_web_param_column_frontend( + self, app, users, synthese_data, additionnal_column + ): """ Test de renseigner le paramètre LIST_COLUMNS_FRONTEND pour renvoyer uniquement les colonnes souhaitées """ - expected_additionnal_column = "altitude_min" app.config["SYNTHESE"]["LIST_COLUMNS_FRONTEND"] = [ { - "prop": expected_additionnal_column, - "name": "Altitude min", + "prop": additionnal_column, + "name": "My label", } ] @@ -478,7 +483,7 @@ def test_get_observations_for_web_param_column_frontend(self, app, users, synthe response = self.client.get(url_for("gn_synthese.get_observations_for_web")) data = response.get_json() - expected_columns = {"id", "url_source", expected_additionnal_column} + expected_columns = {"id", "url_source", additionnal_column} assert all( set(feature["properties"].keys()) == expected_columns for feature in data["features"]