def setUp(self): NagiosLogger.reset() self.mock_status = self.patch_object(NagiosLogger, 'status', autospec=True) self.mock_status.add_error.return_value = sentinel.with_error self.mock_status.add_warning.return_value = sentinel.with_warning self.mock_status.add_important.return_value = sentinel.with_important
def setUp(self): NagiosLogger.reset() self.mock_status = self.patch_object(NagiosLogger, 'status', autospec=True) self.mock_status.add_error.return_value = sentinel.with_error self.mock_status.add_warning.return_value = sentinel.with_warning self.mock_status.add_important.return_value = sentinel.with_important
def test_status_is_reset(self): NagiosLogger.reset() self.assertEqual(NagiosLogger.status, sentinel.initial) self.mock_initial.assert_called_once_with()
def test_status_is_reset(self): NagiosLogger.reset() self.assertEqual(NagiosLogger.status, sentinel.initial) self.mock_initial.assert_called_once_with()