Commit 3a2f26d1 authored by Jérome Perrin's avatar Jérome Perrin

run tests silently



git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@9357 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent d81e75e6
...@@ -59,6 +59,8 @@ from Products.ERP5Type.Tool.ClassTool import _aq_reset ...@@ -59,6 +59,8 @@ from Products.ERP5Type.Tool.ClassTool import _aq_reset
class TestBase(ERP5TypeTestCase): class TestBase(ERP5TypeTestCase):
run_all_test = 1 run_all_test = 1
quiet = 1
object_portal_type = "Organisation" object_portal_type = "Organisation"
not_defined_property_id = "azerty_qwerty" not_defined_property_id = "azerty_qwerty"
not_defined_property_value = "qwerty_azerty" not_defined_property_value = "qwerty_azerty"
...@@ -223,7 +225,7 @@ class TestBase(ERP5TypeTestCase): ...@@ -223,7 +225,7 @@ class TestBase(ERP5TypeTestCase):
Organisation.immediateReindexObject = crashingMethod Organisation.immediateReindexObject = crashingMethod
Organisation.recursiveImmediateReindexObject = crashingMethod Organisation.recursiveImmediateReindexObject = crashingMethod
def test_01_areActivitiesWellLaunchedByPropertyEdit(self, quiet=0, def test_01_areActivitiesWellLaunchedByPropertyEdit(self, quiet=quiet,
run=run_all_test): run=run_all_test):
""" """
Test if setter does not call a activity if the attribute Test if setter does not call a activity if the attribute
...@@ -299,7 +301,7 @@ class TestBase(ERP5TypeTestCase): ...@@ -299,7 +301,7 @@ class TestBase(ERP5TypeTestCase):
CheckIfMessageQueueIsEmpty \ CheckIfMessageQueueIsEmpty \
' '
sequence_list.addSequenceString(sequence_string) sequence_list.addSequenceString(sequence_string)
sequence_list.play(self) sequence_list.play(self, quiet=quiet)
def stepCheckGroupValue(self, sequence=None, sequence_list=None, **kw): def stepCheckGroupValue(self, sequence=None, sequence_list=None, **kw):
""" """
...@@ -340,7 +342,7 @@ class TestBase(ERP5TypeTestCase): ...@@ -340,7 +342,7 @@ class TestBase(ERP5TypeTestCase):
object_instance.edit(group_value=object_instance.getGroupValue()) object_instance.edit(group_value=object_instance.getGroupValue())
def test_02_areActivitiesWellLaunchedByCategoryEdit(self, quiet=0, def test_02_areActivitiesWellLaunchedByCategoryEdit(self, quiet=quiet,
run=run_all_test): run=run_all_test):
""" """
Test if setter does not call a activity if the attribute Test if setter does not call a activity if the attribute
...@@ -414,7 +416,7 @@ class TestBase(ERP5TypeTestCase): ...@@ -414,7 +416,7 @@ class TestBase(ERP5TypeTestCase):
CheckIfMessageQueueIsEmpty \ CheckIfMessageQueueIsEmpty \
' '
sequence_list.addSequenceString(sequence_string) sequence_list.addSequenceString(sequence_string)
sequence_list.play(self) sequence_list.play(self, quiet=quiet)
def stepSetDifferentTitleValueWithSetter(self, sequence=None, def stepSetDifferentTitleValueWithSetter(self, sequence=None,
sequence_list=None, **kw): sequence_list=None, **kw):
...@@ -437,7 +439,7 @@ class TestBase(ERP5TypeTestCase): ...@@ -437,7 +439,7 @@ class TestBase(ERP5TypeTestCase):
object_instance = sequence.get('object_instance') object_instance = sequence.get('object_instance')
object_instance.setTitle(object_instance.getTitle()) object_instance.setTitle(object_instance.getTitle())
def test_03_areActivitiesWellLaunchedByPropertySetter(self, quiet=0, def test_03_areActivitiesWellLaunchedByPropertySetter(self, quiet=quiet,
run=run_all_test): run=run_all_test):
""" """
Test if setter does not call a activity if the attribute Test if setter does not call a activity if the attribute
...@@ -493,7 +495,7 @@ class TestBase(ERP5TypeTestCase): ...@@ -493,7 +495,7 @@ class TestBase(ERP5TypeTestCase):
CheckIfMessageQueueIsEmpty \ CheckIfMessageQueueIsEmpty \
' '
sequence_list.addSequenceString(sequence_string) sequence_list.addSequenceString(sequence_string)
sequence_list.play(self) sequence_list.play(self, quiet=quiet)
def stepSetDifferentGroupValueWithSetter(self, sequence=None, def stepSetDifferentGroupValueWithSetter(self, sequence=None,
sequence_list=None, **kw): sequence_list=None, **kw):
...@@ -525,7 +527,7 @@ class TestBase(ERP5TypeTestCase): ...@@ -525,7 +527,7 @@ class TestBase(ERP5TypeTestCase):
object_instance = sequence.get('object_instance') object_instance = sequence.get('object_instance')
object_instance.setGroupValue(object_instance.getGroupValue()) object_instance.setGroupValue(object_instance.getGroupValue())
def test_04_areActivitiesWellLaunchedByCategorySetter(self, quiet=0, def test_04_areActivitiesWellLaunchedByCategorySetter(self, quiet=quiet,
run=run_all_test): run=run_all_test):
""" """
Test if setter does not call a activity if the attribute Test if setter does not call a activity if the attribute
...@@ -581,7 +583,7 @@ class TestBase(ERP5TypeTestCase): ...@@ -581,7 +583,7 @@ class TestBase(ERP5TypeTestCase):
CheckIfMessageQueueIsEmpty \ CheckIfMessageQueueIsEmpty \
' '
sequence_list.addSequenceString(sequence_string) sequence_list.addSequenceString(sequence_string)
sequence_list.play(self) sequence_list.play(self, quiet=quiet)
def stepSetObjectNotDefinedProperty(self, sequence=None, def stepSetObjectNotDefinedProperty(self, sequence=None,
sequence_list=None, **kw): sequence_list=None, **kw):
...@@ -633,7 +635,7 @@ class TestBase(ERP5TypeTestCase): ...@@ -633,7 +635,7 @@ class TestBase(ERP5TypeTestCase):
current_group_value=None current_group_value=None
) )
def test_05_getPropertyWithoutPropertySheet(self, quiet=0, run=run_all_test): def test_05_getPropertyWithoutPropertySheet(self, quiet=quiet, run=run_all_test):
""" """
Test if set/getProperty work without any property sheet. Test if set/getProperty work without any property sheet.
""" """
...@@ -656,7 +658,7 @@ class TestBase(ERP5TypeTestCase): ...@@ -656,7 +658,7 @@ class TestBase(ERP5TypeTestCase):
CheckGetNotDefinedProperty \ CheckGetNotDefinedProperty \
' '
sequence_list.addSequenceString(sequence_string) sequence_list.addSequenceString(sequence_string)
sequence_list.play(self) sequence_list.play(self, quiet=quiet)
def stepCreateTempClass(self, sequence=None, sequence_list=None, **kw): def stepCreateTempClass(self, sequence=None, sequence_list=None, **kw):
""" """
...@@ -741,7 +743,7 @@ class TestBase(ERP5TypeTestCase): ...@@ -741,7 +743,7 @@ class TestBase(ERP5TypeTestCase):
object_instance.getProperty( object_instance.getProperty(
self.not_related_to_temp_object_property_id)) self.not_related_to_temp_object_property_id))
def test_06_getPropertyOnTempClass(self, quiet=0, run=run_all_test): def test_06_getPropertyOnTempClass(self, quiet=quiet, run=run_all_test):
""" """
Test if set/getProperty work in temp object without Test if set/getProperty work in temp object without
a portal type with the same name. a portal type with the same name.
...@@ -763,7 +765,7 @@ class TestBase(ERP5TypeTestCase): ...@@ -763,7 +765,7 @@ class TestBase(ERP5TypeTestCase):
CheckGetNotRelatedProperty \ CheckGetNotRelatedProperty \
' '
sequence_list.addSequenceString(sequence_string) sequence_list.addSequenceString(sequence_string)
sequence_list.play(self) sequence_list.play(self, quiet=quiet)
def stepCheckEditMethod(self, sequence=None, def stepCheckEditMethod(self, sequence=None,
sequence_list=None, **kw): sequence_list=None, **kw):
...@@ -786,7 +788,7 @@ class TestBase(ERP5TypeTestCase): ...@@ -786,7 +788,7 @@ class TestBase(ERP5TypeTestCase):
object_instance = sequence.get('object_instance') object_instance = sequence.get('object_instance')
object_instance.setProperty('edit', "now this object is 'read only !!!'") object_instance.setProperty('edit', "now this object is 'read only !!!'")
def test_07_setEditProperty(self, quiet=0, run=run_all_test): def test_07_setEditProperty(self, quiet=quiet, run=run_all_test):
""" """
Test if setProperty erase existing accessors/methods. Test if setProperty erase existing accessors/methods.
""" """
...@@ -800,7 +802,7 @@ class TestBase(ERP5TypeTestCase): ...@@ -800,7 +802,7 @@ class TestBase(ERP5TypeTestCase):
CheckEditMethod \ CheckEditMethod \
' '
sequence_list.addSequenceString(sequence_string) sequence_list.addSequenceString(sequence_string)
sequence_list.play(self) sequence_list.play(self, quiet=quiet)
def stepCreateBaseCategory(self, sequence=None, sequence_list=None, **kw): def stepCreateBaseCategory(self, sequence=None, sequence_list=None, **kw):
""" """
...@@ -845,7 +847,7 @@ class TestBase(ERP5TypeTestCase): ...@@ -845,7 +847,7 @@ class TestBase(ERP5TypeTestCase):
tales_expression=tales_expression, tales_expression=tales_expression,
) )
def test_07_setEditTalesExpression(self, quiet=0, run=run_all_test): def test_07_setEditTalesExpression(self, quiet=quiet, run=run_all_test):
""" """
Test if edit update a tales expression. Test if edit update a tales expression.
""" """
...@@ -859,9 +861,9 @@ class TestBase(ERP5TypeTestCase): ...@@ -859,9 +861,9 @@ class TestBase(ERP5TypeTestCase):
CheckTalesExpression \ CheckTalesExpression \
' '
sequence_list.addSequenceString(sequence_string) sequence_list.addSequenceString(sequence_string)
sequence_list.play(self) sequence_list.play(self, quiet=quiet)
def test_08_emptyObjectHasNoTitle(self, quiet=0, run=run_all_test): def test_08_emptyObjectHasNoTitle(self, quiet=quiet, run=run_all_test):
""" """
Test if edit update a tales expression. Test if edit update a tales expression.
""" """
......
...@@ -52,6 +52,7 @@ class TestTrashTool(ERP5TypeTestCase): ...@@ -52,6 +52,7 @@ class TestTrashTool(ERP5TypeTestCase):
Test some fonctionnality Test some fonctionnality
""" """
run_all_test = 1 run_all_test = 1
quiet = 1
def getTitle(self): def getTitle(self):
return "Trash Tool" return "Trash Tool"
...@@ -266,7 +267,7 @@ class TestTrashTool(ERP5TypeTestCase): ...@@ -266,7 +267,7 @@ class TestTrashTool(ERP5TypeTestCase):
self.assertEqual(len(backup_subobjects_ids), 0) self.assertEqual(len(backup_subobjects_ids), 0)
# tests # tests
def test_01_checkTrashBinCreation(self, quiet=0, run=run_all_test): def test_01_checkTrashBinCreation(self, quiet=quiet, run=run_all_test):
if not run: return if not run: return
if not quiet: if not quiet:
message = 'Test Check TrashBin Creation' message = 'Test Check TrashBin Creation'
...@@ -279,9 +280,9 @@ class TestTrashTool(ERP5TypeTestCase): ...@@ -279,9 +280,9 @@ class TestTrashTool(ERP5TypeTestCase):
CheckTrashBinIndexable \ CheckTrashBinIndexable \
' '
sequence_list.addSequenceString(sequence_string) sequence_list.addSequenceString(sequence_string)
sequence_list.play(self) sequence_list.play(self, quiet=quiet)
def test_02_checkBackupWithoutSave(self, quiet=0, run=run_all_test): def test_02_checkBackupWithoutSave(self, quiet=quiet, run=run_all_test):
if not run: return if not run: return
if not quiet: if not quiet:
message = 'Test Check Backup Without Save' message = 'Test Check Backup Without Save'
...@@ -299,9 +300,9 @@ class TestTrashTool(ERP5TypeTestCase): ...@@ -299,9 +300,9 @@ class TestTrashTool(ERP5TypeTestCase):
CheckObjectNotBackup \ CheckObjectNotBackup \
' '
sequence_list.addSequenceString(sequence_string) sequence_list.addSequenceString(sequence_string)
sequence_list.play(self) sequence_list.play(self, quiet=quiet)
def test_03_checkBackupWithSave(self, quiet=0, run=run_all_test): def test_03_checkBackupWithSave(self, quiet=quiet, run=run_all_test):
if not run: return if not run: return
if not quiet: if not quiet:
message = 'Test Check Backup With Save' message = 'Test Check Backup With Save'
...@@ -320,9 +321,9 @@ class TestTrashTool(ERP5TypeTestCase): ...@@ -320,9 +321,9 @@ class TestTrashTool(ERP5TypeTestCase):
CheckObjectBackupWithoutSubObjects \ CheckObjectBackupWithoutSubObjects \
' '
sequence_list.addSequenceString(sequence_string) sequence_list.addSequenceString(sequence_string)
sequence_list.play(self) sequence_list.play(self, quiet=quiet)
def test_04_checkBackupWithSubObjects(self, quiet=0, run=run_all_test): def test_04_checkBackupWithSubObjects(self, quiet=quiet, run=run_all_test):
if not run: return if not run: return
if not quiet: if not quiet:
message = 'Test Check Backup Without Subobjects' message = 'Test Check Backup Without Subobjects'
...@@ -341,7 +342,7 @@ class TestTrashTool(ERP5TypeTestCase): ...@@ -341,7 +342,7 @@ class TestTrashTool(ERP5TypeTestCase):
CheckObjectBackupWithSubObjects \ CheckObjectBackupWithSubObjects \
' '
sequence_list.addSequenceString(sequence_string) sequence_list.addSequenceString(sequence_string)
sequence_list.play(self) sequence_list.play(self, quiet=quiet)
if __name__ == '__main__': if __name__ == '__main__':
framework() framework()
......
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