Update opolka/ScoDoc from ScoDoc/ScoDoc #2

Merged
opolka merged 1272 commits from ScoDoc/ScoDoc:master into master 2024-05-27 09:11:04 +02:00
Showing only changes of commit 4b49fd5ed9 - Show all commits

View File

@ -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}
) )