Beispiel #1
0
def test_load_csv():
    """Check that correct number of courses were loaded from the full CSV"""
    # Note this only checks the correct number of courses were loaded!
    courses = load_csv("courses.csv")
    eq_(len(courses), 5769)
Beispiel #2
0
def test_write_load():
    """Check that the write and load don't change the courses"""
    courses = load_csv("courses.csv")
    write_json("courses.json", courses)
    loaded_courses = load_json("courses.json")
    eq_(courses, loaded_courses)
Beispiel #3
0
def test_load_csv_small():
    """Check the 3 courses were loaded correctly"""
    courses = load_csv("courses_small.csv")
    eq_(courses, COURSES_SMALL)