Exemple #1
0
 def test_generate_all(self, mock_execute):
     restic.generate(bash_completion_path='/tmp/dummy.path',
                     man_directory='/tmp/man-dir',
                     zsh_completion_path='/tmp/dummy.path')
     mock_execute.assert_called_with([
         'restic', '--json', 'generate', '--bash-completion',
         '/tmp/dummy.path', '--man', '/tmp/man-dir', '--zsh-completion',
         '/tmp/dummy.path'
     ])
Exemple #2
0
 def test_generate_zsh(self, mock_execute):
     restic.generate(zsh_completion_path='/tmp/dummy.path')
     mock_execute.assert_called_with([
         'restic', '--json', 'generate', '--zsh-completion',
         '/tmp/dummy.path'
     ])
Exemple #3
0
 def test_generate_with_no_parameters(self, mock_execute):
     restic.generate()
     mock_execute.assert_called_with(['restic', '--json', 'generate'])
Exemple #4
0
 def test_generate_man(self, mock_execute):
     restic.generate(man_directory='/tmp/man-dir')
     mock_execute.assert_called_with(
         ['restic', '--json', 'generate', '--man', '/tmp/man-dir'])
Exemple #5
0
 def test_can_change_restic_binary_path(self, mock_execute):
     restic.binary_path = '/dummy/path/to/restic-binary'
     restic.generate()
     mock_execute.assert_called_with(
         ['/dummy/path/to/restic-binary', '--json', 'generate'])