Skip to content

Commit

Permalink
test(fixture): fix assert and remove useless one
Browse files Browse the repository at this point in the history
  • Loading branch information
Maxime Vergez authored and jacquesfize committed Jan 26, 2024
1 parent 0460ccf commit 0f4fa7b
Showing 1 changed file with 4 additions and 11 deletions.
15 changes: 4 additions & 11 deletions backend/geonature/tests/fixtures.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand All @@ -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
Expand Down

0 comments on commit 0f4fa7b

Please sign in to comment.