Skip to content

Commit

Permalink
Fix error logging tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
Niklaus Johner committed Jan 6, 2021
1 parent 80a4258 commit bfabc72
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions opengever/bundle/tests/test_os_migration.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def emit(self, record):
self.log_list.append(record.msg)


logger = logging.getLogger('migration')
logger = logging.getLogger('opengever.maintenance')


class TestOSMigrationAnalysisPreconditions(IntegrationTestCase):
Expand Down Expand Up @@ -384,6 +384,7 @@ def test_repository_excel_analyser_os_test_invalid(self):
'repository_depth_violated': False,
'uid': self.empty_repofolder.UID()},
invalid_rows[0])

self.assertIn("leaf node principle violated", log_list[0])

self.assertEqual(
Expand Down Expand Up @@ -459,7 +460,8 @@ def test_repository_excel_analyser_os_test_invalid(self):
'repository_depth_violated': False,
'uid': None},
invalid_rows[3])
self.assertIn("leaf node principle violated", log_list[3])
self.assertIn("Invalid operation: parent not found.", log_list[3])
self.assertIn("leaf node principle violated", log_list[4])

guid = invalid_rows[4]['new_position_guid']
parent_guid = invalid_rows[4]['new_position_parent_guid']
Expand All @@ -486,9 +488,7 @@ def test_repository_excel_analyser_os_test_invalid(self):
'repository_depth_violated': True,
'uid': None},
invalid_rows[4])
self.assertIn(
"repository depth violated.",
log_list[4])
self.assertIn("repository depth violated.", log_list[5])

logger.removeHandler(handler)

Expand Down

0 comments on commit bfabc72

Please sign in to comment.