Update formatting

This commit is contained in:
Alexander Wainwright
2025-06-24 15:48:18 +10:00
parent 7568457984
commit 788e69ebd6

View File

@@ -163,14 +163,16 @@ def test_restore_usage_message(capsys):
assert 'Usage:' in err
@mock.patch("locutus.restore.LocutusConfig")
@mock.patch("os.path.isdir", return_value=True)
@mock.patch("subprocess.run", side_effect=Exception("index explode"))
def test_restore_index_lookup_generic_exception(mock_run, mock_isdir, mock_config, tmp_path, capsys):
mock_config.return_value.get_repo.return_value = "/repo"
@mock.patch('locutus.restore.LocutusConfig')
@mock.patch('os.path.isdir', return_value=True)
@mock.patch('subprocess.run', side_effect=Exception('index explode'))
def test_restore_index_lookup_generic_exception(
mock_run, mock_isdir, mock_config, tmp_path, capsys
):
mock_config.return_value.get_repo.return_value = '/repo'
mock_config.return_value.env = {}
args = make_args("dummy.toml", "dummy.rc", "0", str(tmp_path))
args = make_args('dummy.toml', 'dummy.rc', '0', str(tmp_path))
rc = run_restore(args)
assert rc == 1
err = capsys.readouterr().err
assert "borg restore failed during archive lookup: index explode" in err
assert 'borg restore failed during archive lookup: index explode' in err