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

use a finally bloc to restore normal log handling on failure


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@25772 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 4656f0de
...@@ -549,11 +549,13 @@ class TestERP5Type(PropertySheetTestCase, LogInterceptor): ...@@ -549,11 +549,13 @@ class TestERP5Type(PropertySheetTestCase, LogInterceptor):
from Products.ERP5Type.Base import _aq_reset from Products.ERP5Type.Base import _aq_reset
_aq_reset() _aq_reset()
self._catch_log_errors(ignored_level=INFO) self._catch_log_errors(ignored_level=INFO)
folder = self.getOrganisationModule() try:
orga = folder.newContent(portal_type='Organisation',) folder = self.getOrganisationModule()
# call an accessor, _aq_dynamic will generate accessors orga = folder.newContent(portal_type='Organisation',)
orga.getId() # call an accessor, _aq_dynamic will generate accessors
self._ignore_log_errors() orga.getId()
finally:
self._ignore_log_errors()
def test_09_RenameObjects(self, quiet=quiet, run=run_all_test): def test_09_RenameObjects(self, quiet=quiet, run=run_all_test):
"""Test object renaming. """Test object renaming.
......
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