소스 검색

Merge mostly repetetive tests

Nain 2 년 전
부모
커밋
ce0ce4cd1c
1개의 변경된 파일1개의 추가작업 그리고 23개의 파일을 삭제
  1. 1 23
      tests/unit/actions/test_prune.py

+ 1 - 23
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)