From 0f4fa7b4f6e3d835ed36deb3eafbf0334d37afa9 Mon Sep 17 00:00:00 2001 From: Maxime Vergez Date: Thu, 3 Aug 2023 10:28:58 +0200 Subject: [PATCH] test(fixture): fix assert and remove useless one --- backend/geonature/tests/fixtures.py | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/backend/geonature/tests/fixtures.py b/backend/geonature/tests/fixtures.py index 67b590d234..38d9ad252d 100644 --- a/backend/geonature/tests/fixtures.py +++ b/backend/geonature/tests/fixtures.py @@ -578,10 +578,6 @@ def synthese_sensitive_data(app, users, datasets, source): .filter(TNomenclatures.cd_nomenclature == "0") .one() ) - assert ( - nomenclature_not_sensitive.mnemonique == "Non sensible - Diffusion précise", - nomenclature_not_sensitive.mnemonique, - ) id_nomenclature_not_sensitive = nomenclature_not_sensitive.id_nomenclature synthese_to_assert = Synthese.query.filter( @@ -593,13 +589,10 @@ def synthese_sensitive_data(app, users, datasets, source): ) ).first() - assert ( - synthese_to_assert.id_nomenclature_sensitivity != id_nomenclature_not_sensitive, - ( - f"cd_nom: {synthese_to_assert.cd_nom}, id_nomenclature_bio_status: {synthese_to_assert.id_nomenclature_bio_status}, " - f"id_nomenclature_behaviour: {synthese_to_assert}.id_nomenclature_behaviour, " - f"geojson: {synthese_to_assert.the_geom_4326_geojson}" - ), + assert synthese_to_assert.id_nomenclature_sensitivity != id_nomenclature_not_sensitive, ( + f"cd_nom: {synthese_to_assert.cd_nom}, id_nomenclature_bio_status: {synthese_to_assert.id_nomenclature_bio_status}, " + f"id_nomenclature_behaviour: {synthese_to_assert}.id_nomenclature_behaviour, " + f"geojson: {synthese_to_assert.the_geom_4326_geojson}" ) # Assert that obs_protected_not_sensitive is not a sensitive observation