Commit 8c6c7391 authored by Jérome Perrin's avatar Jérome Perrin

run tests quietly



git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@9358 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 3a2f26d1
......@@ -41,6 +41,8 @@ from Products.ERP5Type.tests.Sequence import Sequence, SequenceList
class TestConstraint(ERP5TypeTestCase):
run_all_test = 1
quiet = 1
object_portal_type = "Organisation"
object_title = "Title test"
......@@ -292,7 +294,7 @@ class TestConstraint(ERP5TypeTestCase):
id='default_constraint',
description='constraint test')
def test_01_Constraint(self, quiet=0, run=run_all_test):
def test_01_Constraint(self, quiet=quiet, run=run_all_test):
"""
Test default Constraint class
"""
......@@ -306,7 +308,7 @@ class TestConstraint(ERP5TypeTestCase):
CheckIfConstraintSucceeded \
'
sequence_list.addSequenceString(sequence_string)
sequence_list.play(self)
sequence_list.play(self, quiet=quiet)
def stepCreatePropertyExistence0(self, sequence=None,
sequence_list=None, **kw):
......@@ -340,7 +342,7 @@ class TestConstraint(ERP5TypeTestCase):
description='propertyExistence test',
title=None)
def test_02_PropertyExistence(self, quiet=0, run=run_all_test):
def test_02_PropertyExistence(self, quiet=quiet, run=run_all_test):
"""
Test property existence
"""
......@@ -393,7 +395,7 @@ class TestConstraint(ERP5TypeTestCase):
CheckIfConstraintSucceeded \
'
sequence_list.addSequenceString(sequence_string)
sequence_list.play(self)
sequence_list.play(self, quiet=quiet)
def stepCreatePropertyTypeValidity(self, sequence=None,
sequence_list=None, **kw):
......@@ -405,7 +407,7 @@ class TestConstraint(ERP5TypeTestCase):
id='property_type_validity',
description='propertyTypeValidity test')
def test_03_PropertyTypeValidity(self, quiet=0, run=run_all_test):
def test_03_PropertyTypeValidity(self, quiet=quiet, run=run_all_test):
"""
Test property type validity
"""
......@@ -494,7 +496,7 @@ class TestConstraint(ERP5TypeTestCase):
CheckIfConstraintSucceeded \
'
sequence_list.addSequenceString(sequence_string)
sequence_list.play(self)
sequence_list.play(self, quiet=quiet)
def stepCreateAttributeEquality0(self, sequence=None,
sequence_list=None, **kw):
......@@ -517,7 +519,7 @@ class TestConstraint(ERP5TypeTestCase):
description='AttributeEquality test',
title=self.object_title)
def test_04_AttributeEquality(self, quiet=0, run=run_all_test):
def test_04_AttributeEquality(self, quiet=quiet, run=run_all_test):
"""
Test attribute equality
"""
......@@ -560,7 +562,7 @@ class TestConstraint(ERP5TypeTestCase):
CheckIfConstraintSucceeded \
'
sequence_list.addSequenceString(sequence_string)
sequence_list.play(self)
sequence_list.play(self, quiet=quiet)
def stepCreateCategoryExistence0(self, sequence=None,
sequence_list=None, **kw):
......@@ -606,7 +608,7 @@ class TestConstraint(ERP5TypeTestCase):
group=None,
portal_type = ('Organisation', ))
def test_05_CategoryExistence(self, quiet=0, run=run_all_test):
def test_05_CategoryExistence(self, quiet=quiet, run=run_all_test):
"""
Test category existence
"""
......@@ -676,7 +678,7 @@ class TestConstraint(ERP5TypeTestCase):
CheckIfConstraintSucceeded \
'
sequence_list.addSequenceString(sequence_string)
sequence_list.play(self)
sequence_list.play(self, quiet=quiet)
def stepCreateCategoryMembershipArity0(self, sequence=None,
sequence_list=None, **kw):
......@@ -748,7 +750,7 @@ class TestConstraint(ERP5TypeTestCase):
portal_type=('Category', ),
base_category=('group', ))
def test_06_CategoryMembershipArity(self, quiet=0, run=run_all_test):
def test_06_CategoryMembershipArity(self, quiet=quiet, run=run_all_test):
"""
Test category existence
"""
......@@ -899,7 +901,7 @@ class TestConstraint(ERP5TypeTestCase):
CheckIfConstraintSucceeded \
'
sequence_list.addSequenceString(sequence_string)
sequence_list.play(self)
sequence_list.play(self, quiet=quiet)
def stepCreateCategoryRelatedMembershipArity0(self, sequence=None,
sequence_list=None, **kw):
......@@ -946,7 +948,7 @@ class TestConstraint(ERP5TypeTestCase):
portal_type=('Organisation', ),
base_category=('group', ))
def test_07_CategoryRelatedMembershipArity(self, quiet=0, run=run_all_test):
def test_07_CategoryRelatedMembershipArity(self, quiet=quiet, run=run_all_test):
"""
Test related category existence
"""
......@@ -1015,7 +1017,7 @@ class TestConstraint(ERP5TypeTestCase):
CheckIfConstraintFailed \
'
sequence_list.addSequenceString(sequence_string)
sequence_list.play(self)
sequence_list.play(self, quiet=quiet)
if __name__ == '__main__':
framework()
......
......@@ -53,10 +53,7 @@ class TestXMLMatrix(ERP5TypeTestCase):
"""
Tests the Cell API
"""
# Some helper methods
#def afterSetUp(self):
quiet = 1
def getBusinessTemplateList(self):
"""
......@@ -74,7 +71,6 @@ class TestXMLMatrix(ERP5TypeTestCase):
"""
Some pre-configuration
"""
LOG('afterSetUp', 0, 'Called')
uf = self.getPortal().acl_users
uf._doAddUser('manager', '', ['Manager'], [])
user = uf.getUserById('manager').__of__(uf)
......@@ -84,11 +80,12 @@ class TestXMLMatrix(ERP5TypeTestCase):
if '1' not in module.objectIds():
order = module.newContent(id='1', portal_type='Purchase Order')
def test_01_RenameCellRange(self):
def test_01_RenameCellRange(self, quiet=quiet):
"""
tests renameCellRange behaviour
"""
ZopeTestCase._print('\nTest Rename Cell Range ')
if not quiet:
ZopeTestCase._print('\nTest Rename Cell Range ')
portal = self.getPortal()
module = portal.purchase_order_module
order = module._getOb('1')
......@@ -262,22 +259,23 @@ class TestXMLMatrix(ERP5TypeTestCase):
cell_path = url + '/' + id
self.assertEquals(catalog.hasPath(cell_path),False)
def test_02_SetCellRangeAndCatalogWithActivities(self):
def test_02_SetCellRangeAndCatalogWithActivities(self, quiet=quiet):
"""
Tests if set Cell range do well catalog and uncatalog, using activities
"""
ZopeTestCase._print('\nTest Set Cell Range And Catalog With Activities ')
if not quiet:
ZopeTestCase._print('\nTest Set Cell Range And Catalog With Activities ')
self.checkSetCellRangeAndCatalog(active=1)
def test_03_SetCellRangeAndCatalogWithoutActivities(self):
def test_03_SetCellRangeAndCatalogWithoutActivities(self, quiet=quiet):
"""
Tests if set Cell range do well catalog and uncatalog, not using
activities
"""
ZopeTestCase._print('\nTest Set Cell Range And Catalog Without Activities ')
if not quiet:
ZopeTestCase._print('\nTest Set Cell Range And Catalog Without Activities ')
self.checkSetCellRangeAndCatalog(active=0)
if __name__ == '__main__':
framework()
else:
......
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