mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
Fix test for failed restore
This commit is contained in:
parent
0c4e4c67c5
commit
2b2527fb72
1 changed files with 2 additions and 2 deletions
|
@ -467,13 +467,13 @@ def test_restore_app_script_failure_handling(monkeypatch, mocker):
|
|||
def custom_hook_exec(name, *args, **kwargs):
|
||||
if os.path.basename(name).startswith("restore"):
|
||||
monkeypatch.undo()
|
||||
raise Exception
|
||||
return (1, None)
|
||||
|
||||
monkeypatch.setattr("yunohost.backup.hook_exec", custom_hook_exec)
|
||||
|
||||
assert not _is_installed("wordpress")
|
||||
|
||||
with message(mocker, "app_restore_failed", app="wordpress"):
|
||||
with message(mocker, "app_restore_script_failed"):
|
||||
with raiseYunohostError(mocker, "restore_nothings_done"):
|
||||
backup_restore(
|
||||
system=None, name=backup_list()["archives"][0], apps=["wordpress"]
|
||||
|
|
Loading…
Add table
Reference in a new issue