Exemplo n.º 1
0
def test_install_app_with_slash():
    """
    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_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"')