30 lines
792 B
Python
30 lines
792 B
Python
from random import choice, randint
|
|
|
|
from .tools import (
|
|
build_tribe_assessment_exercise,
|
|
build_tribe_assessment_exercise_question,
|
|
)
|
|
|
|
|
|
def test_assessement_register_exercise():
|
|
exercise_qty = randint(1, 10)
|
|
tribes, assessments, exercises = build_tribe_assessment_exercise(
|
|
exercise_per_assessment=exercise_qty
|
|
)
|
|
|
|
assert len(assessments[0].exercises) == exercise_qty
|
|
assert assessments[0].exercises == exercises
|
|
|
|
|
|
def test_exercise_register_question():
|
|
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
|