diff --git a/tests/unit/sco_fake_gen.py b/tests/unit/sco_fake_gen.py
index 1f2dff8bdb53d1f7021aba04913c88fb9e341f7c..fe5b700ae674aacbe822910b0cac1156e770aa69 100644
--- a/tests/unit/sco_fake_gen.py
+++ b/tests/unit/sco_fake_gen.py
@@ -25,7 +25,6 @@ from app.models import (
     Matiere,
     ModuleImpl,
 )
-from app.scodoc import notesdb as ndb
 from app.scodoc import codes_cursus
 from app.scodoc import sco_edit_matiere
 from app.scodoc import sco_edit_module
@@ -41,8 +40,6 @@ from app.scodoc.sco_exceptions import ScoValueError
 from config import Config, TestConfig
 
 
-from tests.unit.setup import NOTES_T
-
 random.seed(12345)  # tests reproductibles
 
 
@@ -433,6 +430,8 @@ class ScoFake(object):
             notes: liste des notes (float).
             Si non spécifié, utilise la liste NOTES_T
         """
+        from tests.unit.setup import NOTES_T
+
         if notes is None:
             notes = NOTES_T
         for e in eval_list:
diff --git a/tests/unit/setup.py b/tests/unit/setup.py
index 776210358c9db3e1b6077ccc93a83ea1c1d5c6e7..31ea1496449955266b56e643599e157bedbd27e2 100644
--- a/tests/unit/setup.py
+++ b/tests/unit/setup.py
@@ -7,14 +7,13 @@ from app import db, models
 from app.models import Formation
 import app.scodoc.sco_utils as scu
 from app.scodoc import codes_cursus
+from tests.unit import sco_fake_gen
 
 # Valeurs des notes saisies par les tests:
 NOTES_T = [
     float(x) for x in (20, 0, 10, 13 / 7.0, 12.5, 24.0 / 11) + tuple(range(1, 19))
 ]
 
-from tests.unit import sco_fake_gen
-
 
 def build_formation_test(
     nb_mods=1,
diff --git a/tests/unit/yaml_setup.py b/tests/unit/yaml_setup.py
index 577855ba5d5626bdc4c23c86d0af4b5b6642252f..6140537ce05e0d0dd8c3fd425c67c6345e70d453 100644
--- a/tests/unit/yaml_setup.py
+++ b/tests/unit/yaml_setup.py
@@ -127,7 +127,7 @@ def create_formsemestre(
     modules = [
         m
         for m in formsemestre.formation.modules.filter_by(semestre_id=semestre_id)
-        if (not m.parcours)  # module de tronc commun
+        if not m.parcours  # module de tronc commun
         or (not sem_parcours_ids)  # semestre sans parcours => tous
         or ({p.id for p in m.parcours} & sem_parcours_ids)
     ]
@@ -329,6 +329,13 @@ def setup_from_yaml(filename: str) -> tuple[dict, Formation, list[str]]:
     with open(filename, encoding="utf-8") as f:
         doc = yaml.safe_load(f.read())
 
+    # Passe tous les noms en majuscules (car stockés ainsi en base)
+    if "Etudiants" in doc:
+        doc["Etudiants"] = {k.upper(): v for (k, v) in doc["Etudiants"].items()}
+        for e in doc["Etudiants"].values():
+            if "prenom" in e:
+                e["prenom"] = e["prenom"].upper()
+
     # Charge de ref. comp. avant la formation, de façon à pouvoir
     # re-créer les associations UE/Niveaux
     yaml_setup_but.setup_formation_referentiel(doc.get("ReferentielCompetences", {}))
diff --git a/tests/unit/yaml_setup_but.py b/tests/unit/yaml_setup_but.py
index d87ca1350424939b6b0fb021f524f6e72a865536..0198fcf6545afb7cfdadc668031bb407a511067a 100644
--- a/tests/unit/yaml_setup_but.py
+++ b/tests/unit/yaml_setup_but.py
@@ -4,7 +4,7 @@
 # See LICENSE
 ##############################################################################
 
-"""Mise en place pour tests unitaires à partir de descriptions YAML: 
+"""Mise en place pour tests unitaires à partir de descriptions YAML:
      fonctions spécifiques au BUT
 """
 from pathlib import Path