File: test_import_key.py

package info (click to toggle)
borgmatic 2.0.11-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 4,752 kB
  • sloc: python: 58,506; sh: 150; makefile: 8; javascript: 5
file content (19 lines) | stat: -rw-r--r-- 569 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
from flexmock import flexmock

from borgmatic.actions import import_key as module


def test_run_import_key_does_not_raise():
    flexmock(module.logger).answer = lambda message: None
    flexmock(module.borgmatic.borg.import_key).should_receive('import_key')
    import_arguments = flexmock(repository=flexmock())

    module.run_import_key(
        repository={'path': 'repo'},
        config={},
        local_borg_version=None,
        import_arguments=import_arguments,
        global_arguments=flexmock(),
        local_path=None,
        remote_path=None,
    )