コード例 #1
0
ファイル: mac_package_test.py プロジェクト: xbglowx/salt
 def test_install_wildcard(self):
     '''
         Test installing a PKG file with a wildcard
     '''
     mock = MagicMock()
     with patch.dict(macpackage.__salt__, {'cmd.run_all': mock}):
         macpackage.install('/path/to/*.pkg')
         mock.assert_called_once_with('installer -pkg /path/to/*.pkg -target LocalSystem', python_shell=True)
コード例 #2
0
ファイル: mac_package_test.py プロジェクト: xbglowx/salt
 def test_install_with_extras(self):
     '''
         Test installing a PKG file with extra options
     '''
     mock = MagicMock()
     with patch.dict(macpackage.__salt__, {'cmd.run_all': mock}):
         macpackage.install('/path/to/file.pkg', store=True, allow_untrusted=True)
         mock.assert_called_once_with('installer -pkg /path/to/file.pkg -target LocalSystem -store -allowUntrusted',
                                      python_shell=False)