fix: tests
This commit is contained in:
@@ -2,6 +2,7 @@ import pytest
|
||||
from models import GradingCalculator, db, Assessment, ClassGroup, Student, Exercise, GradingElement, Grade
|
||||
from app_config import config_manager
|
||||
from datetime import date
|
||||
from .conftest import create_student_with_enrollment
|
||||
|
||||
|
||||
class TestUnifiedGrading:
|
||||
@@ -143,10 +144,9 @@ class TestIntegration:
|
||||
db.session.add(class_group)
|
||||
db.session.flush()
|
||||
|
||||
# Créer étudiants
|
||||
student1 = Student(first_name='Alice', last_name='Martin', class_group_id=class_group.id)
|
||||
student2 = Student(first_name='Bob', last_name='Durand', class_group_id=class_group.id)
|
||||
db.session.add_all([student1, student2])
|
||||
# Créer étudiants avec inscriptions temporelles
|
||||
student1 = create_student_with_enrollment('Alice', 'Martin', class_group.id)
|
||||
student2 = create_student_with_enrollment('Bob', 'Durand', class_group.id)
|
||||
db.session.flush()
|
||||
|
||||
# Créer évaluation
|
||||
@@ -261,16 +261,15 @@ class TestPerformance:
|
||||
db.session.add(class_group)
|
||||
db.session.flush()
|
||||
|
||||
# 30 étudiants
|
||||
# 30 étudiants avec inscriptions temporelles
|
||||
students = []
|
||||
for i in range(30):
|
||||
student = Student(
|
||||
first_name=f'Étudiant{i}',
|
||||
last_name=f'Test{i}',
|
||||
class_group_id=class_group.id
|
||||
student = create_student_with_enrollment(
|
||||
f'Étudiant{i}',
|
||||
f'Test{i}',
|
||||
class_group.id
|
||||
)
|
||||
students.append(student)
|
||||
db.session.add_all(students)
|
||||
db.session.flush()
|
||||
|
||||
# Évaluation avec 20 éléments
|
||||
|
||||
Reference in New Issue
Block a user