Skip to content

Commit

Permalink
fix: check only created synthese observations
Browse files Browse the repository at this point in the history
  • Loading branch information
Maxime Vergez committed Aug 1, 2023
1 parent 9e0b5c5 commit 45a3f7e
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions backend/geonature/tests/fixtures.py
Original file line number Diff line number Diff line change
Expand Up @@ -510,15 +510,24 @@ def synthese_sensitive_data(app, users, datasets, source):
.one()
).id_nomenclature
assert (
Synthese.query.filter(Synthese.cd_nom == sensitive_protected_cd_nom)
Synthese.query.filter(
Synthese.id_synthese.in_(
(
data[key].id_synthese
for key in ["obs_sensitive_protected", "obs_sensitive_protected_2"]
)
)
)
.first()
.id_nomenclature_sensitivity
!= id_nomenclature_not_sensitive
)

# Assert that obs_protected_not_sensitive is not a sensitive observation
assert (
Synthese.query.filter(Synthese.cd_nom == protected_not_sensitive_cd_nom)
Synthese.query.filter(
Synthese.id_synthese == data["obs_protected_not_sensitive"].id_synthese
)
.first()
.id_nomenclature_sensitivity
== id_nomenclature_not_sensitive
Expand Down

0 comments on commit 45a3f7e

Please sign in to comment.