From 88b945dcb95ce135e853b04db161e28c1d128609 Mon Sep 17 00:00:00 2001 From: Dan Helfman Date: Tue, 1 Oct 2024 09:31:03 -0700 Subject: [PATCH] Add missing test (#911). --- tests/unit/commands/test_borgmatic.py | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/tests/unit/commands/test_borgmatic.py b/tests/unit/commands/test_borgmatic.py index 10eebd90..ffd0e61e 100644 --- a/tests/unit/commands/test_borgmatic.py +++ b/tests/unit/commands/test_borgmatic.py @@ -981,6 +981,29 @@ def test_run_actions_runs_export_key(): ) +def test_run_actions_runs_change_passphrase(): + flexmock(module).should_receive('add_custom_log_levels') + flexmock(module).should_receive('get_skip_actions').and_return([]) + flexmock(module.command).should_receive('execute_hook') + flexmock(borgmatic.actions.change_passphrase).should_receive('run_change_passphrase').once() + + tuple( + module.run_actions( + arguments={ + 'global': flexmock(dry_run=False, log_file='foo'), + 'change-passphrase': flexmock(), + }, + config_filename=flexmock(), + config={'repositories': []}, + config_paths=[], + local_path=flexmock(), + remote_path=flexmock(), + local_borg_version=flexmock(), + repository={'path': 'repo'}, + ) + ) + + def test_run_actions_runs_delete(): flexmock(module).should_receive('add_custom_log_levels') flexmock(module).should_receive('get_skip_actions').and_return([])