def update_course_descriptor_content(cls, courseid, content): """ Updates the content of the dict that describes the course """ return write_json_or_yaml(cls._get_course_descriptor_path(courseid), content)
def test_yaml_write(self): write_json_or_yaml(os.path.join(self.dir_path, "output.yaml"), {'key1': 'data1', 'key2': {'key3': [1, 2]}}) assert load_json_or_yaml(os.path.join(self.dir_path, "output.yaml")) == {'key1': 'data1', 'key2': {'key3': [1, 2]}}