Always use the ERP5TypeTestCase.publish() methods.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@31545 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 077568df
......@@ -36,8 +36,8 @@ from Products.ERP5OOo.tests.utils import Validator
HTTP_OK = 200
# setting this to a true value allow the use of a debugger
debug = 0
# setting this to True allows the .publish() calls to provide tracebacks
debug = False
class TestOOoStyle(ERP5TypeTestCase, ZopeTestCase.Functional):
"""Tests ODF styles for ERP5."""
......@@ -66,10 +66,9 @@ class TestOOoStyle(ERP5TypeTestCase, ZopeTestCase.Functional):
self.portal.portal_selections.setSelectionFor(
'person_module_selection', Selection())
if debug:
def publish(self, path, basic=None, **kw):
kw['handle_errors'] = False
return ZopeTestCase.Functional.publish(self, path, basic, **kw)
def publish(self, *args, **kw):
kw['handle_errors'] = not debug
return ERP5TypeTestCase.publish(self, *args, **kw)
def _validate(self, odf_file_data):
error_list = self.validator.validate(odf_file_data)
......
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