Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge to QA #1914

Merged
merged 3 commits into from
Dec 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions api/clever/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,9 @@
"1": "E",
"2": "E",
"3": "E",
"4": "E", # Middle
"5": "M",
"6": "M",
"4": "E",
"5": "E",
"6": "M", # Middle
"7": "M",
"8": "M",
"9": "H", # High
Expand All @@ -72,7 +72,6 @@
"Ungraded": None,
}


def external_type_from_clever_grade(grade):
"""Maps a 'grade' value returned by the Clever API for student users to an external_type"""
return CLEVER_GRADE_TO_EXTERNAL_TYPE_MAP.get(grade, None)
Expand Down
5 changes: 3 additions & 2 deletions tests/clever/test_clever.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,12 @@ def test_external_type_from_clever_grade(self):
THEN: The matching external_type value should be returned, or None if the match fails
"""
for e_grade in [
"InfantToddler", "Preschool", "PreKindergarten", "TransitionalKindergarten", "Kindergarten", "1", "2", "3", "4"
"InfantToddler", "Preschool", "PreKindergarten", "TransitionalKindergarten",
"Kindergarten", "1", "2", "3", "4", "5"
]:
assert external_type_from_clever_grade(e_grade) == "E"

for m_grade in ["5", "6", "7", "8"]:
for m_grade in ["6", "7", "8"]:
assert external_type_from_clever_grade(m_grade) == "M"

for h_grade in ["9", "10", "11", "12", "13", "PostGraduate"]:
Expand Down
Loading