DocDoeAI / tests /test_concept_graph.py
asnannp's picture
Deploy backend cd4237ff: support routes + rate limit + exam_date nullable + upload 413 fix
7c6ffa6
Raw
History Blame Contribute Delete
832 Bytes
from app.services.concept_graph import (
SOUND_WAVES_CHAPTER_ID,
concept_for,
ordered_chapter_concepts,
)
def test_sound_waves_finishes_with_a_gated_chapter_test() -> None:
concepts = ordered_chapter_concepts(SOUND_WAVES_CHAPTER_ID)
assert [concept.mission_id for concept in concepts] == [
"M1",
"M2",
"M3",
"M4",
"M5",
"M6",
"M7",
"M8",
"M9",
]
final_test = concept_for(f"{SOUND_WAVES_CHAPTER_ID}:M9")
assert final_test is not None
assert final_test.title == "Sound Waves Chapter Test & Revision"
assert final_test.prerequisites == tuple(
f"{SOUND_WAVES_CHAPTER_ID}:M{index}" for index in range(1, 9)
)
assert "chapter_test" in final_test.practice_types
assert final_test.resources.pyq is False