def update_json(self, path: str): """Update metadata with static metadata from JSON file Args: path (str): Path to JSON dataset metadata Returns: None """ self.data = load_json_into_existing_dict(self.data, path)
def update_from_json(self, path: str): """Update metadata with static metadata from JSON file Args: path (str): Path to JSON dataset metadata Returns: None """ self.data = load_json_into_existing_dict(self.data, path)
def test_load_json_into_existing_dict(self, configfolder): existing_dict = load_json(join(configfolder, "hdx_config.json")) result = load_json_into_existing_dict( existing_dict, join(configfolder, "project_configuration.json") ) assert list(result.items()) == list(TestLoader.expected_json.items())
def test_load_json_into_existing_dict(self, configfolder): existing_dict = load_json(join(configfolder, 'hdx_config.json')) result = load_json_into_existing_dict( existing_dict, join(configfolder, 'project_configuration.json')) assert result == TestLoader.expected_json