diff --git a/tests/unit/actions/test_prune.py b/tests/unit/actions/test_prune.py index 21e8260..6c09e0c 100644 --- a/tests/unit/actions/test_prune.py +++ b/tests/unit/actions/test_prune.py @@ -3,7 +3,7 @@ from flexmock import flexmock from borgmatic.actions import prune as module -def test_run_prune_calls_hooks(): +def test_run_prune_calls_hooks_of_configured_repository(): flexmock(module.logger).answer = lambda message: None flexmock(module.borgmatic.borg.prune).should_receive('prune_archives') flexmock(module.borgmatic.hooks.command).should_receive('execute_hook').times(2) @@ -26,28 +26,6 @@ def test_run_prune_calls_hooks(): ) -def test_run_prune_runs_with_no_explicit_repository(): - flexmock(module.logger).answer = lambda message: None - flexmock(module.borgmatic.borg.prune).should_receive('prune_archives') - prune_arguments = flexmock(repository=None, stats=flexmock(), list_archives=flexmock()) - global_arguments = flexmock(monitoring_verbosity=1, dry_run=False) - - module.run_prune( - config_filename='test.yaml', - repository='repo', - storage={}, - retention={}, - hooks={}, - hook_context={}, - local_borg_version=None, - prune_arguments=prune_arguments, - global_arguments=global_arguments, - dry_run_label='', - local_path=None, - remote_path=None, - ) - - def test_run_prune_runs_with_select_repository(): flexmock(module.logger).answer = lambda message: None flexmock(module.borgmatic.config.validate).should_receive('repositories_match').and_return(True)