tests:backuprestore: let hooks gracefully fake exec except 'restore'

This commit is contained in:
axolotle 2023-12-07 13:49:47 +01:00
parent 878944c7c1
commit 5563fd8ca0

View file

@ -455,6 +455,8 @@ def test_restore_app_script_failure_handling(monkeypatch, mocker):
if os.path.basename(name).startswith("restore"): if os.path.basename(name).startswith("restore"):
monkeypatch.undo() monkeypatch.undo()
return (1, None) return (1, None)
else:
return (0, {})
monkeypatch.setattr("yunohost.hook.hook_exec", custom_hook_exec) monkeypatch.setattr("yunohost.hook.hook_exec", custom_hook_exec)