コード例 #1
0
ファイル: test_zpool.py プロジェクト: bsemar/IntCont
 def test_healthy(self):
     '''
     Tests successful return of healthy function
     '''
     ret = {}
     ret['stdout'] = "all pools are healthy"
     ret['stderr'] = ""
     ret['retcode'] = 0
     mock_cmd = MagicMock(return_value=ret)
     with patch.dict(zpool.__salt__, {'cmd.run_all': mock_cmd}):
         self.assertTrue(zpool.healthy())
コード例 #2
0
ファイル: zpool_test.py プロジェクト: HowardMei/saltstack
 def test_healthy(self):
     '''
     Tests successful return of healthy function
     '''
     ret = {}
     ret['stdout'] = "all pools are healthy"
     ret['stderr'] = ""
     ret['retcode'] = 0
     mock_cmd = MagicMock(return_value=ret)
     with patch.dict(zpool.__salt__, {'cmd.run_all': mock_cmd}):
         self.assertTrue(zpool.healthy())
コード例 #3
0
ファイル: test_zpool.py プロジェクト: nikhiljha/salt
    def test_healthy(self):
        """
        Tests successful return of healthy function
        """
        ret = {}
        ret["stdout"] = "all pools are healthy"
        ret["stderr"] = ""
        ret["retcode"] = 0
        mock_cmd = MagicMock(return_value=ret)

        with patch.dict(zpool.__salt__, {"cmd.run_all": mock_cmd}), patch.dict(
                zpool.__utils__, self.utils_patch):
            self.assertTrue(zpool.healthy())