Commit f39ad5df authored by Jérome Perrin's avatar Jérome Perrin

CMFActivity: fix test after removing CMFActivity.log

fcd26be0 (CMFActivity,syncml: stop using a dedicated log file,
2023-02-17) introduced a regression in test and left an unused variable.
parent 58070276
......@@ -92,9 +92,6 @@ ROLE_PROCESSING = 1
# Logging channel definitions
import logging
# Main logging channel
activity_logger = logging.getLogger('CMFActivity')
# Some logging subchannels
activity_tracking_logger = logging.getLogger('Tracking')
activity_timing_logger = logging.getLogger('CMFActivity.TimingLog')
......
......@@ -2472,7 +2472,7 @@ class TestCMFActivity(ERP5TypeTestCase, LogInterceptor):
activity_tool = self.portal.portal_activities
kw = {}
self._catch_log_errors(subsystem='CMFActivity')
self._catch_log_errors()
try:
activity_tool.activity_failure_mail_notification = True
for kw['activity'] in ActivityTool.activity_dict:
......@@ -2496,11 +2496,12 @@ class TestCMFActivity(ERP5TypeTestCase, LogInterceptor):
self.commit()
self.assertEqual(1, activity_tool.countMessage())
activity_tool.tic()
self.assertIn('no object found', self.logged.pop().getMessage())
cmf_activty_log, = [log for log in self.logged if 'CMFActivity' in log.name]
self.logged = []
self.assertIn('no object found', cmf_activty_log.getMessage())
finally:
self._ignore_log_errors()
self.assertFalse(self.logged)
self.assertFalse(message_list, message_list)
self.assertFalse(message_list)
def test_activateByPath(self):
organisation = self.getOrganisation()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment