test_validate.py 599 B

1234567891011121314151617
  1. from flexmock import flexmock
  2. from borgmatic.actions.config import validate as module
  3. def test_run_validate_does_not_raise():
  4. validate_arguments = flexmock(show=False)
  5. flexmock(module.borgmatic.config.generate).should_receive('render_configuration')
  6. module.run_validate(validate_arguments, flexmock())
  7. def test_run_validate_with_show_does_not_raise():
  8. validate_arguments = flexmock(show=True)
  9. flexmock(module.borgmatic.config.generate).should_receive('render_configuration')
  10. module.run_validate(validate_arguments, {'test.yaml': flexmock(), 'other.yaml': flexmock()})