Exemplo n.º 1
0
 def test_install_app_with_slash(self):
     '''
         Test installing an APP package with a specific target
     '''
     mock = MagicMock()
     with patch.dict(macpackage.__salt__, {'cmd.run': mock}):
         macpackage.install_app('/path/to/file.app/')
         mock.assert_called_once_with('rsync -a --delete /path/to/file.app/ '
                                      '/Applications/file.app')
Exemplo n.º 2
0
 def test_install_app_specify_target(self):
     '''
         Test installing an APP package with a specific target
     '''
     mock = MagicMock()
     with patch.dict(macpackage.__salt__, {'cmd.run': mock}):
         macpackage.install_app('/path/to/file.app', '/Applications/new.app')
         mock.assert_called_once_with('rsync -a --no-compress --delete /path/to/file.app/ '
                                      '/Applications/new.app')
Exemplo n.º 3
0
 def test_install_app_with_slash(self):
     '''
         Test installing an APP package with a specific target
     '''
     mock = MagicMock()
     with patch.dict(macpackage.__salt__, {'cmd.run': mock}):
         macpackage.install_app('/path/to/file.app/')
         mock.assert_called_once_with('rsync -a --delete "/path/to/file.app/" '
                                      '"/Applications/file.app"')
Exemplo n.º 4
0
 def test_install_app(self):
     '''
         Test installing an APP package
     '''
     mock = MagicMock()
     with patch.dict(macpackage.__salt__, {'cmd.run': mock}):
         macpackage.install_app('/path/to/file.app')
         mock.assert_called_once_with('rsync -a --delete /path/to/file.app/ '
                                      '/Applications/file.app')