forked from ScoDoc/ScoDoc
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)
|
self.moy_ue > (sco_codes.ParcoursBUT.BARRE_MOY - sco_codes.NOTES_TOLERANCE)
|
||||||
) or self.formsemestre.modalite == "EXT":
|
) or self.formsemestre.modalite == "EXT":
|
||||||
self.codes.insert(0, sco_codes.ADM)
|
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():
|
elif self.rcue and self.rcue.est_compensable():
|
||||||
self.codes.insert(0, sco_codes.CMP)
|
self.codes.insert(0, sco_codes.CMP)
|
||||||
self.explanation = "compensable dans le RCUE"
|
self.explanation = "compensable dans le RCUE"
|
||||||
|
@ -141,7 +141,7 @@ Etudiants:
|
|||||||
"SAÉ 1.SEE.03": 18 # UE13 => sera capitalisée
|
"SAÉ 1.SEE.03": 18 # UE13 => sera capitalisée
|
||||||
"SAÉ 1.SEE.04": 7 # UE14 ratée
|
"SAÉ 1.SEE.04": 7 # UE14 ratée
|
||||||
attendu: # les codes jury que l'on doit vérifier
|
attendu: # les codes jury que l'on doit vérifier
|
||||||
deca:
|
deca: # decision année
|
||||||
passage_de_droit: False
|
passage_de_droit: False
|
||||||
res_pair: None
|
res_pair: None
|
||||||
codes: [ "RED", "..." ]
|
codes: [ "RED", "..." ]
|
||||||
|
@ -35,10 +35,12 @@ def test_but_jury_GB(test_client):
|
|||||||
_check_deca(formsemestre)
|
_check_deca(formsemestre)
|
||||||
|
|
||||||
S1: FormSemestre = FormSemestre.query.filter_by(titre="S1_SEE").first()
|
S1: FormSemestre = FormSemestre.query.filter_by(titre="S1_SEE").first()
|
||||||
_test_but_jury_S1(S1)
|
_test_but_jury(S1, doc)
|
||||||
_test_but_jury_S2()
|
S2: FormSemestre = FormSemestre.query.filter_by(titre="S2_SEE").first()
|
||||||
_test_but_jury_S3()
|
_test_but_jury(S2, doc)
|
||||||
_test_but_jury_S1_redoublant()
|
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):
|
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
|
assert deca.nb_competences == nb_ues_un_sem
|
||||||
|
|
||||||
|
|
||||||
def _test_but_jury_S1(formsemestre: FormSemestre):
|
def _test_but_jury(formsemestre: FormSemestre, doc: dict):
|
||||||
"""Test jurys BUT1 avec un seul parcours.
|
"""Test jurys
|
||||||
Vérifie aussi les champs de DecisionsProposeesAnnee
|
Vérifie les champs de DecisionsProposeesAnnee et UEs
|
||||||
"""
|
"""
|
||||||
etud: Identite = formsemestre.etuds.first()
|
for etud in formsemestre.etuds:
|
||||||
|
deca = DecisionsProposeesAnnee(etud, formsemestre)
|
||||||
# XXX à compléter avec le jury quand on aura décidé des notes
|
doc_formsemestre = doc["Etudiants"][etud.nom]["formsemestres"][
|
||||||
|
formsemestre.titre
|
||||||
|
]
|
||||||
def _test_but_jury_S2():
|
assert doc_formsemestre
|
||||||
pass
|
if "attendu" in doc_formsemestre:
|
||||||
|
if "deca" in doc_formsemestre["attendu"]:
|
||||||
|
deca_att = doc_formsemestre["attendu"]["deca"]
|
||||||
def _test_but_jury_S3():
|
yaml_setup.compare_decisions_annee(deca, deca_att)
|
||||||
"""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
|
|
||||||
|
Loading…
Reference in New Issue
Block a user