2022-12-20 07:23:52 +00:00
|
|
|
from random import randint
|
|
|
|
|
2022-12-20 07:28:45 +00:00
|
|
|
from backend.model.student import Student
|
|
|
|
from backend.model.tribe import Tribe
|
|
|
|
from tests.model.fakes import build_tribe_assessment
|
2022-12-20 07:23:52 +00:00
|
|
|
|
|
|
|
|
|
|
|
def test_tribe_register_assessment():
|
|
|
|
assessments_qty = randint(1, 10)
|
|
|
|
tribes, assessments = build_tribe_assessment(assessment_per_tribe=assessments_qty)
|
|
|
|
|
|
|
|
assert len(tribes[0].assessments) == assessments_qty
|
|
|
|
assert tribes[0].assessments == assessments
|
2022-12-20 05:59:35 +00:00
|
|
|
|
|
|
|
|
|
|
|
def test_tribe_register_student():
|
|
|
|
tribe = Tribe("foo", "2nd")
|
|
|
|
student = Student("1", "Bob", tribe)
|
|
|
|
|
|
|
|
assert len(tribe.students) == 1
|
|
|
|
assert tribe.students[0] == student
|