mirror of
https://projects.torsion.org/witten/borgmatic.git
synced 2025-01-08 00:55:42 +00:00
20 lines
738 B
Python
20 lines
738 B
Python
from flexmock import flexmock
|
|
|
|
from borgmatic.actions import change_passphrase as module
|
|
|
|
|
|
def test_run_change_passphrase_does_not_raise():
|
|
flexmock(module.logger).answer = lambda message: None
|
|
flexmock(module.borgmatic.config.validate).should_receive('repositories_match').and_return(True)
|
|
flexmock(module.borgmatic.borg.change_passphrase).should_receive('change_passphrase')
|
|
change_passphrase_arguments = flexmock(repository=flexmock())
|
|
|
|
module.run_change_passphrase(
|
|
repository={'path': 'repo'},
|
|
config={},
|
|
local_borg_version=None,
|
|
change_passphrase_arguments=change_passphrase_arguments,
|
|
global_arguments=flexmock(),
|
|
local_path=None,
|
|
remote_path=None,
|
|
)
|