コード例 #1
0
 def test__operation_fail(self, mock_open, mock_ssh):
     ins = operation_general.GeneralOperaion(self.operation_cfg,
                                             self.context)
     mock_ssh.SSH().execute.return_value = (1, "failed", '')
     ins.setup()
     ins.run()
     ins.rollback()
コード例 #2
0
 def test__operation_successful_noparam(self, mock_open, mock_ssh):
     ins = operation_general.GeneralOperaion(self.operation_cfg_noparam,
                                             self.context)
     mock_ssh.SSH().execute.return_value = (0, "success", '')
     ins.setup()
     ins.run()
     ins.rollback()