borgmatic/tests/unit/actions/test_transfer.py
Dan Helfman 5f595f7ac3
All checks were successful
continuous-integration/drone/push Build is passing
Fix regression in which the "transfer" action produced a traceback (#663).
2023-03-30 23:21:20 -07:00

21 lines
631 B
Python

from flexmock import flexmock
from borgmatic.actions import transfer as module
def test_run_transfer_does_not_raise():
flexmock(module.logger).answer = lambda message: None
flexmock(module.borgmatic.borg.transfer).should_receive('transfer_archives')
transfer_arguments = flexmock()
global_arguments = flexmock(monitoring_verbosity=1, dry_run=False)
module.run_transfer(
repository={'path': 'repo'},
storage={},
local_borg_version=None,
transfer_arguments=transfer_arguments,
global_arguments=global_arguments,
local_path=None,
remote_path=None,
)