예제 #1
0
    def test_email_alerts(self):
        '''
        Test to Enable/Disable email alerts
        '''
        mock = MagicMock(return_value=True)
        with patch.object(drac, '__execute_cmd', mock):
            self.assertTrue(drac.email_alerts(True))

        mock = MagicMock(return_value=True)
        with patch.object(drac, '__execute_cmd', mock):
            self.assertTrue(drac.email_alerts(False))
예제 #2
0
파일: drac_test.py 프로젝트: DaveQB/salt
    def test_email_alerts(self):
        '''
        Test to Enable/Disable email alerts
        '''
        mock = MagicMock(return_value=True)
        with patch.object(drac, '__execute_cmd', mock):
            self.assertTrue(drac.email_alerts(True))

        mock = MagicMock(return_value=True)
        with patch.object(drac, '__execute_cmd', mock):
            self.assertTrue(drac.email_alerts(False))