forked from ScoDoc/DocScoDoc
Tests Yaml: vérification des résultats jury + fix explanation
This commit is contained in:
parent
2dd7fe3c95
commit
636aa25f2a
@ -1027,7 +1027,7 @@ class DecisionsProposeesUE(DecisionsProposees):
|
||||
self.moy_ue > (sco_codes.ParcoursBUT.BARRE_MOY - sco_codes.NOTES_TOLERANCE)
|
||||
) or self.formsemestre.modalite == "EXT":
|
||||
self.codes.insert(0, sco_codes.ADM)
|
||||
self.explanation = (f"Moyenne >= {sco_codes.ParcoursBUT.BARRE_MOY}/20",)
|
||||
self.explanation = f"Moyenne >= {sco_codes.ParcoursBUT.BARRE_MOY}/20"
|
||||
elif self.rcue and self.rcue.est_compensable():
|
||||
self.codes.insert(0, sco_codes.CMP)
|
||||
self.explanation = "compensable dans le RCUE"
|
||||
|
@ -141,7 +141,7 @@ Etudiants:
|
||||
"SAÉ 1.SEE.03": 18 # UE13 => sera capitalisée
|
||||
"SAÉ 1.SEE.04": 7 # UE14 ratée
|
||||
attendu: # les codes jury que l'on doit vérifier
|
||||
deca:
|
||||
deca: # decision année
|
||||
passage_de_droit: False
|
||||
res_pair: None
|
||||
codes: [ "RED", "..." ]
|
||||
|
@ -35,10 +35,12 @@ def test_but_jury_GB(test_client):
|
||||
_check_deca(formsemestre)
|
||||
|
||||
S1: FormSemestre = FormSemestre.query.filter_by(titre="S1_SEE").first()
|
||||
_test_but_jury_S1(S1)
|
||||
_test_but_jury_S2()
|
||||
_test_but_jury_S3()
|
||||
_test_but_jury_S1_redoublant()
|
||||
_test_but_jury(S1, doc)
|
||||
S2: FormSemestre = FormSemestre.query.filter_by(titre="S2_SEE").first()
|
||||
_test_but_jury(S2, doc)
|
||||
S3: FormSemestre = FormSemestre.query.filter_by(titre="S3").first()
|
||||
_test_but_jury(S3, doc)
|
||||
# _test_but_jury(S1_redoublant, doc)
|
||||
|
||||
|
||||
def _check_deca(formsemestre: FormSemestre, etud: Identite = None):
|
||||
@ -83,29 +85,17 @@ def _check_deca(formsemestre: FormSemestre, etud: Identite = None):
|
||||
assert deca.nb_competences == nb_ues_un_sem
|
||||
|
||||
|
||||
def _test_but_jury_S1(formsemestre: FormSemestre):
|
||||
"""Test jurys BUT1 avec un seul parcours.
|
||||
Vérifie aussi les champs de DecisionsProposeesAnnee
|
||||
def _test_but_jury(formsemestre: FormSemestre, doc: dict):
|
||||
"""Test jurys
|
||||
Vérifie les champs de DecisionsProposeesAnnee et UEs
|
||||
"""
|
||||
etud: Identite = formsemestre.etuds.first()
|
||||
|
||||
# XXX à compléter avec le jury quand on aura décidé des notes
|
||||
|
||||
|
||||
def _test_but_jury_S2():
|
||||
pass
|
||||
|
||||
|
||||
def _test_but_jury_S3():
|
||||
"""Test jurys BUT2/S3 avec 2 parcours dans le sem."""
|
||||
formsemestre: FormSemestre = FormSemestre.query.filter_by(titre="S3").first()
|
||||
etud: Identite = formsemestre.etuds.filter_by(
|
||||
prenom="Étudiant_SEE"
|
||||
).first() # du parcours SEE
|
||||
assert etud
|
||||
deca = DecisionsProposeesAnnee(etud, formsemestre)
|
||||
assert len(deca.niveaux_competences) == 5 # 5 compétences dans ce parcours
|
||||
|
||||
|
||||
def _test_but_jury_S1_redoublant():
|
||||
pass
|
||||
for etud in formsemestre.etuds:
|
||||
deca = DecisionsProposeesAnnee(etud, formsemestre)
|
||||
doc_formsemestre = doc["Etudiants"][etud.nom]["formsemestres"][
|
||||
formsemestre.titre
|
||||
]
|
||||
assert doc_formsemestre
|
||||
if "attendu" in doc_formsemestre:
|
||||
if "deca" in doc_formsemestre["attendu"]:
|
||||
deca_att = doc_formsemestre["attendu"]["deca"]
|
||||
yaml_setup.compare_decisions_annee(deca, deca_att)
|
||||
|
Loading…
Reference in New Issue
Block a user