示例#1
0
文件: pyenv_test.py 项目: DaveQB/salt
 def test_is_installed(self):
     '''
     Test if it check if pyenv is installed.
     '''
     mock_cmd = MagicMock(return_value=True)
     mock_opt = MagicMock(return_value='salt stack')
     with patch.dict(pyenv.__salt__, {'config.option': mock_opt,
                                      'cmd.has_exec': mock_cmd}):
         self.assertTrue(pyenv.is_installed())
示例#2
0
 def test_is_installed(self):
     '''
     Test if it check if pyenv is installed.
     '''
     mock_cmd = MagicMock(return_value=True)
     mock_opt = MagicMock(return_value='salt stack')
     with patch.dict(pyenv.__salt__, {'config.option': mock_opt,
                                      'cmd.has_exec': mock_cmd}):
         self.assertTrue(pyenv.is_installed())
示例#3
0
 def test_is_installed(self):
     """
     Test if it check if pyenv is installed.
     """
     mock_cmd = MagicMock(return_value=True)
     mock_opt = MagicMock(return_value="salt stack")
     with patch.dict(
         pyenv.__salt__, {"config.option": mock_opt, "cmd.has_exec": mock_cmd}
     ):
         self.assertTrue(pyenv.is_installed())