From 4b49fd5ed973b9e6f00580988c208010baee7e72 Mon Sep 17 00:00:00 2001 From: IDK Date: Wed, 28 Jun 2023 21:25:01 +0200 Subject: [PATCH] Adapte les tests unitaires jury BUT --- tests/unit/yaml_setup_but.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/tests/unit/yaml_setup_but.py b/tests/unit/yaml_setup_but.py index 6532cce1e..606fa14d1 100644 --- a/tests/unit/yaml_setup_but.py +++ b/tests/unit/yaml_setup_but.py @@ -247,7 +247,7 @@ def but_compare_decisions_annee(deca: DecisionsProposeesAnnee, deca_att: dict): but_check_decisions_ues(deca.decisions_ues, deca_att["decisions_ues"]) if "nb_rcues_annee" in deca_att: - assert deca_att["nb_rcues_annee"] == len(deca.rcues_annee) + assert deca_att["nb_rcues_annee"] == len(deca.get_decisions_rcues_annee()) if "decisions_rcues" in deca_att: but_check_decisions_rcues( @@ -282,14 +282,12 @@ def check_deca_fields(formsemestre: FormSemestre, etud: Identite = None): .filter(UniteEns.semestre_idx == formsemestre.semestre_id) .all() ) + assert len(ues) == len(deca.decisions_rcue_by_niveau.values()) if formsemestre.semestre_id % 2: assert deca.formsemestre_impair == formsemestre - assert ues == deca.ues_impair else: assert deca.formsemestre_pair == formsemestre - assert ues == deca.ues_pair assert deca.inscription_etat == scu.INSCRIT - assert deca.inscription_etat_impair == scu.INSCRIT assert (deca.parcour is None) or ( deca.parcour.id in {p.id for p in formsemestre.parcours} )