From aa3687ba029abae89f9a01d6e45df3ab843e93ea Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Sun, 15 Sep 2019 02:13:02 +0200 Subject: [PATCH] Small trick needed to be able to test chained app upgrades --- src/yunohost/app.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/yunohost/app.py b/src/yunohost/app.py index d64baeaa3..6b75d82d0 100644 --- a/src/yunohost/app.py +++ b/src/yunohost/app.py @@ -620,7 +620,10 @@ def app_upgrade(app=[], url=None, file=None): app_dict = app_info(app_instance_name, raw=True) - if file: + if file and isinstance(file, dict): + # We use this dirty hack to test chained upgrades in unit/functional tests + manifest, extracted_app_folder = _extract_app_from_file(file[app_instance_name]) + elif file: manifest, extracted_app_folder = _extract_app_from_file(file) elif url: manifest, extracted_app_folder = _fetch_app_from_git(url)