forked from ScoDoc/ScoDoc
Adapte les tests unitaires jury BUT
This commit is contained in:
parent
7ed521e4f5
commit
4b49fd5ed9
@ -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"])
|
but_check_decisions_ues(deca.decisions_ues, deca_att["decisions_ues"])
|
||||||
|
|
||||||
if "nb_rcues_annee" in deca_att:
|
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:
|
if "decisions_rcues" in deca_att:
|
||||||
but_check_decisions_rcues(
|
but_check_decisions_rcues(
|
||||||
@ -282,14 +282,12 @@ def check_deca_fields(formsemestre: FormSemestre, etud: Identite = None):
|
|||||||
.filter(UniteEns.semestre_idx == formsemestre.semestre_id)
|
.filter(UniteEns.semestre_idx == formsemestre.semestre_id)
|
||||||
.all()
|
.all()
|
||||||
)
|
)
|
||||||
|
assert len(ues) == len(deca.decisions_rcue_by_niveau.values())
|
||||||
if formsemestre.semestre_id % 2:
|
if formsemestre.semestre_id % 2:
|
||||||
assert deca.formsemestre_impair == formsemestre
|
assert deca.formsemestre_impair == formsemestre
|
||||||
assert ues == deca.ues_impair
|
|
||||||
else:
|
else:
|
||||||
assert deca.formsemestre_pair == formsemestre
|
assert deca.formsemestre_pair == formsemestre
|
||||||
assert ues == deca.ues_pair
|
|
||||||
assert deca.inscription_etat == scu.INSCRIT
|
assert deca.inscription_etat == scu.INSCRIT
|
||||||
assert deca.inscription_etat_impair == scu.INSCRIT
|
|
||||||
assert (deca.parcour is None) or (
|
assert (deca.parcour is None) or (
|
||||||
deca.parcour.id in {p.id for p in formsemestre.parcours}
|
deca.parcour.id in {p.id for p in formsemestre.parcours}
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user