Skip to content

Commit

Permalink
test(fixture): fix assert and cd_nomenclature
Browse files Browse the repository at this point in the history
  • Loading branch information
Maxime Vergez committed Aug 1, 2023
1 parent 652a7fd commit 9e0b5c5
Showing 1 changed file with 13 additions and 7 deletions.
20 changes: 13 additions & 7 deletions backend/geonature/tests/fixtures.py
Original file line number Diff line number Diff line change
Expand Up @@ -506,17 +506,23 @@ def synthese_sensitive_data(app, users, datasets, source):
TNomenclatures.query.filter(
TNomenclatures.nomenclature_type.has(BibNomenclaturesTypes.mnemonique == "SENSIBILITE")
)
.filter(TNomenclatures.cd_nomenclature == "4")
.filter(TNomenclatures.cd_nomenclature == "0")
.one()
).id_nomenclature
Synthese.query.filter(
Synthese.cd_nom == sensitive_protected_cd_nom
).first().id_nomenclature_sensitivity != id_nomenclature_not_sensitive
assert (
Synthese.query.filter(Synthese.cd_nom == sensitive_protected_cd_nom)
.first()
.id_nomenclature_sensitivity
!= id_nomenclature_not_sensitive
)

# Assert that obs_protected_not_sensitive is not a sensitive observation
Synthese.query.filter(
Synthese.cd_nom == protected_not_sensitive_cd_nom
).first().id_nomenclature_sensitivity == id_nomenclature_not_sensitive
assert (
Synthese.query.filter(Synthese.cd_nom == protected_not_sensitive_cd_nom)
.first()
.id_nomenclature_sensitivity
== id_nomenclature_not_sensitive
)

## Assert that obs_sensitive_protected and obs_protected_not_sensitive are protected observation
def assert_observation_is_protected(name_observation):
Expand Down

0 comments on commit 9e0b5c5

Please sign in to comment.