def test_curriculum_load_invalid_json():
    # This isn't valid json because of the trailing comma
    contents = """
{
  "x": [1, 2, 3,]
}
"""
    fp = io.StringIO(contents)
    with pytest.raises(CurriculumLoadingError):
        Curriculum._load_curriculum(fp)
def test_curriculum_load_good():
    expected = {"x": 1}
    value = json.dumps(expected)
    fp = io.StringIO(value)
    assert expected == Curriculum._load_curriculum(fp)