Remove unused module and outdated test expectations (#576).

This commit is contained in:
Dan Helfman 2023-03-21 10:29:17 -07:00
parent 3f17c355ca
commit f9ef52f9a5
2 changed files with 0 additions and 14 deletions

View file

@ -1,5 +1,4 @@
import logging
import os
import borgmatic.logger
from borgmatic.borg import environment, flags

View file

@ -26,7 +26,6 @@ def test_export_tar_archive_calls_borg_with_path_parameters():
flexmock(module.flags).should_receive('make_repository_archive_flags').and_return(
('repo::archive',)
)
flexmock(module.os.path).should_receive('abspath').and_return('repo')
insert_execute_command_mock(
('borg', 'export-tar', 'repo::archive', 'test.tar', 'path1', 'path2')
)
@ -48,7 +47,6 @@ def test_export_tar_archive_calls_borg_with_local_path_parameters():
flexmock(module.flags).should_receive('make_repository_archive_flags').and_return(
('repo::archive',)
)
flexmock(module.os.path).should_receive('abspath').and_return('repo')
insert_execute_command_mock(
('borg1', 'export-tar', 'repo::archive', 'test.tar'), borg_local_path='borg1'
)
@ -71,7 +69,6 @@ def test_export_tar_archive_calls_borg_with_remote_path_parameters():
flexmock(module.flags).should_receive('make_repository_archive_flags').and_return(
('repo::archive',)
)
flexmock(module.os.path).should_receive('abspath').and_return('repo')
insert_execute_command_mock(
('borg', 'export-tar', '--remote-path', 'borg1', 'repo::archive', 'test.tar')
)
@ -94,7 +91,6 @@ def test_export_tar_archive_calls_borg_with_umask_parameters():
flexmock(module.flags).should_receive('make_repository_archive_flags').and_return(
('repo::archive',)
)
flexmock(module.os.path).should_receive('abspath').and_return('repo')
insert_execute_command_mock(
('borg', 'export-tar', '--umask', '0770', 'repo::archive', 'test.tar')
)
@ -116,7 +112,6 @@ def test_export_tar_archive_calls_borg_with_lock_wait_parameters():
flexmock(module.flags).should_receive('make_repository_archive_flags').and_return(
('repo::archive',)
)
flexmock(module.os.path).should_receive('abspath').and_return('repo')
insert_execute_command_mock(
('borg', 'export-tar', '--lock-wait', '5', 'repo::archive', 'test.tar')
)
@ -138,7 +133,6 @@ def test_export_tar_archive_with_log_info_calls_borg_with_info_parameter():
flexmock(module.flags).should_receive('make_repository_archive_flags').and_return(
('repo::archive',)
)
flexmock(module.os.path).should_receive('abspath').and_return('repo')
insert_execute_command_mock(('borg', 'export-tar', '--info', 'repo::archive', 'test.tar'))
insert_logging_mock(logging.INFO)
@ -159,7 +153,6 @@ def test_export_tar_archive_with_log_debug_calls_borg_with_debug_parameters():
flexmock(module.flags).should_receive('make_repository_archive_flags').and_return(
('repo::archive',)
)
flexmock(module.os.path).should_receive('abspath').and_return('repo')
insert_execute_command_mock(
('borg', 'export-tar', '--debug', '--show-rc', 'repo::archive', 'test.tar')
)
@ -182,7 +175,6 @@ def test_export_tar_archive_calls_borg_with_dry_run_parameter():
flexmock(module.flags).should_receive('make_repository_archive_flags').and_return(
('repo::archive',)
)
flexmock(module.os.path).should_receive('abspath').and_return('repo')
flexmock(module).should_receive('execute_command').never()
module.export_tar_archive(
@ -202,7 +194,6 @@ def test_export_tar_archive_calls_borg_with_tar_filter_parameters():
flexmock(module.flags).should_receive('make_repository_archive_flags').and_return(
('repo::archive',)
)
flexmock(module.os.path).should_receive('abspath').and_return('repo')
insert_execute_command_mock(
('borg', 'export-tar', '--tar-filter', 'bzip2', 'repo::archive', 'test.tar')
)
@ -225,7 +216,6 @@ def test_export_tar_archive_calls_borg_with_list_parameter():
flexmock(module.flags).should_receive('make_repository_archive_flags').and_return(
('repo::archive',)
)
flexmock(module.os.path).should_receive('abspath').and_return('repo')
insert_execute_command_mock(
('borg', 'export-tar', '--list', 'repo::archive', 'test.tar'),
output_log_level=logging.ANSWER,
@ -249,7 +239,6 @@ def test_export_tar_archive_calls_borg_with_strip_components_parameter():
flexmock(module.flags).should_receive('make_repository_archive_flags').and_return(
('repo::archive',)
)
flexmock(module.os.path).should_receive('abspath').and_return('repo')
insert_execute_command_mock(
('borg', 'export-tar', '--strip-components', '5', 'repo::archive', 'test.tar')
)
@ -272,7 +261,6 @@ def test_export_tar_archive_skips_abspath_for_remote_repository_parameter():
flexmock(module.flags).should_receive('make_repository_archive_flags').and_return(
('server:repo::archive',)
)
flexmock(module.os.path).should_receive('abspath').never()
insert_execute_command_mock(('borg', 'export-tar', 'server:repo::archive', 'test.tar'))
module.export_tar_archive(
@ -292,7 +280,6 @@ def test_export_tar_archive_calls_borg_with_stdout_destination_path():
flexmock(module.flags).should_receive('make_repository_archive_flags').and_return(
('repo::archive',)
)
flexmock(module.os.path).should_receive('abspath').and_return('repo')
insert_execute_command_mock(('borg', 'export-tar', 'repo::archive', '-'), capture=False)
module.export_tar_archive(