Ejemplo n.º 1
0
def filters_to_results(all_courses):
    return {
        'mand': Course.get_mandatory_courses(all_courses),
        'elect': Course.get_elective_courses(all_courses),
        'load_below': Course.get_filtered_courses_by_load(3.5, all_courses),
        'rate_over': Course.get_filtered_courses_by_rating(3.5, all_courses),
        'has_preqs': Course.get_courses_with_preqs(all_courses),
        'no_preqs': Course.get_courses_without_preqs(all_courses),
        'rater_num': Course.get_courses_with_ratings(all_courses, 5)
    }
Ejemplo n.º 2
0
def test_get_courses_with_preq(all_courses):
    courses = Course.get_courses_with_preqs(all_courses)
    assert all(course.has_preqs() for course in courses)