test_mount.py 764 B

1234567891011121314151617181920212223242526
  1. from flexmock import flexmock
  2. from borgmatic.actions import mount as module
  3. def test_run_mount_does_not_raise():
  4. flexmock(module.logger).answer = lambda message: None
  5. flexmock(module.borgmatic.config.validate).should_receive('repositories_match').and_return(True)
  6. flexmock(module.borgmatic.borg.mount).should_receive('mount_archive')
  7. mount_arguments = flexmock(
  8. repository=flexmock(),
  9. archive=flexmock(),
  10. mount_point=flexmock(),
  11. paths=flexmock(),
  12. foreground=flexmock(),
  13. options=flexmock(),
  14. )
  15. module.run_mount(
  16. repository='repo',
  17. storage={},
  18. local_borg_version=None,
  19. mount_arguments=mount_arguments,
  20. local_path=None,
  21. remote_path=None,
  22. )