def METHOD_NAME():
    appliance_path = os.path.join(
        os.path.dirname(__file__), "appliances", "microcore-linux.gns3a")
    a = Appliance(registry, appliance_path)
    new_version = {'images': {'hda_disk_image': {'filename': 'linux-microcore-42.0.img', 'version': '42.0'}}, 'name': '42.0'}
    a.create_new_version(new_version)
    v = a['versions'][-1:][0]
    assert v == {
        'images':
        {
            'hda_disk_image':
                {
                    'filename': 'linux-microcore-42.0.img',
                    'version': '42.0'
                }
        },
        'name': '42.0'
    }
    # tests what happens without versions in file
    wrong_appliance_fp, wrong_appliance_file = tempfile.mkstemp()
    with open(appliance_path, encoding='utf-8') as f:
        appliance = json.loads(f.read())
        del appliance['versions']
        os.write(wrong_appliance_fp, json.dumps(appliance).encode())
        os.close(wrong_appliance_fp)
    a = Appliance(registry, wrong_appliance_file)
    with pytest.raises(ApplianceError):
        a.create_new_version("42.0")
    os.remove(wrong_appliance_file)