Commit 7d39f342 authored by Arnaud Fontaine's avatar Arnaud Fontaine

Use fail() instead of raising AssertionError in ZODB Component tests.

parent 95f3f8f5
...@@ -1276,8 +1276,8 @@ class _TestZodbComponent(SecurityTestCase): ...@@ -1276,8 +1276,8 @@ class _TestZodbComponent(SecurityTestCase):
except ImportError: except ImportError:
pass pass
else: else:
raise AssertionError("Component '%s' should not have been generated" % \ self.fail("Component '%s' should not have been generated" % \
full_module_name) full_module_name)
def assertModuleImportable(self, module_name): def assertModuleImportable(self, module_name):
full_module_name = self._getComponentFullModuleName(module_name) full_module_name = self._getComponentFullModuleName(module_name)
...@@ -1286,8 +1286,8 @@ class _TestZodbComponent(SecurityTestCase): ...@@ -1286,8 +1286,8 @@ class _TestZodbComponent(SecurityTestCase):
__import__(full_module_name, fromlist=[self._getComponentModuleName()], __import__(full_module_name, fromlist=[self._getComponentModuleName()],
level=0) level=0)
except ImportError: except ImportError:
raise AssertionError("Component '%s' should have been generated" % \ self.fail("Component '%s' should have been generated" % \
full_module_name) full_module_name)
def testValidateInvalidate(self): def testValidateInvalidate(self):
""" """
...@@ -1721,7 +1721,7 @@ class TestZodbExtensionComponent(_TestZodbComponent): ...@@ -1721,7 +1721,7 @@ class TestZodbExtensionComponent(_TestZodbComponent):
self.assertEquals(e.message, self.assertEquals(e.message,
'external method could not be called because it is None') 'external method could not be called because it is None')
else: else:
raise AssertionError("TestExternalMethod should not be callable") self.fail("TestExternalMethod should not be callable")
from Products.ERP5Type.Core.DocumentComponent import DocumentComponent from Products.ERP5Type.Core.DocumentComponent import DocumentComponent
......
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