2022-12-20 06:58:50 +00:00
|
|
|
from random import choice, randint
|
|
|
|
|
2022-12-20 07:28:45 +00:00
|
|
|
from .fakes import (
|
2022-12-20 07:23:52 +00:00
|
|
|
build_tribe_assessment_exercise,
|
|
|
|
build_tribe_assessment_exercise_question,
|
|
|
|
)
|
2022-12-20 06:18:48 +00:00
|
|
|
|
|
|
|
|
|
|
|
def test_assessement_register_exercise():
|
2022-12-20 06:58:50 +00:00
|
|
|
exercise_qty = randint(1, 10)
|
|
|
|
tribes, assessments, exercises = build_tribe_assessment_exercise(
|
|
|
|
exercise_per_assessment=exercise_qty
|
|
|
|
)
|
2022-12-20 06:18:48 +00:00
|
|
|
|
2022-12-20 06:58:50 +00:00
|
|
|
assert len(assessments[0].exercises) == exercise_qty
|
|
|
|
assert assessments[0].exercises == exercises
|
2022-12-20 06:18:48 +00:00
|
|
|
|
|
|
|
|
|
|
|
def test_exercise_register_question():
|
2022-12-20 06:58:50 +00:00
|
|
|
question_qty = randint(1, 10)
|
|
|
|
(
|
|
|
|
tribes,
|
|
|
|
assessments,
|
|
|
|
exercises,
|
|
|
|
questions,
|
|
|
|
) = build_tribe_assessment_exercise_question(question_per_exercise=question_qty)
|
|
|
|
|
|
|
|
assert len(exercises[0].questions) == question_qty
|
|
|
|
assert exercises[0].questions == questions
|