Commit 356d5956 authored by Alexandre Boeglin's avatar Alexandre Boeglin

cleaner add/remove of crashing_method


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@10959 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent a056536a
...@@ -109,6 +109,19 @@ class TestBase(ERP5TypeTestCase): ...@@ -109,6 +109,19 @@ class TestBase(ERP5TypeTestCase):
#portal_catalog.manage_catalogClear() #portal_catalog.manage_catalogClear()
self.createCategories() self.createCategories()
#Overwrite immediateReindexObject() with a crashing method
def crashingMethod(self):
self.ImmediateReindexObjectIsCalled()
from Products.ERP5Type.Document.Organisation import Organisation
Organisation.immediateReindexObject = crashingMethod
Organisation.recursiveImmediateReindexObject = crashingMethod
def beforeTearDown(self):
# Remove crashing method
from Products.ERP5Type.Document.Organisation import Organisation
del Organisation.immediateReindexObject
del Organisation.recursiveImmediateReindexObject
def createCategories(self): def createCategories(self):
""" """
Light install create only base categories, so we create Light install create only base categories, so we create
...@@ -217,16 +230,6 @@ class TestBase(ERP5TypeTestCase): ...@@ -217,16 +230,6 @@ class TestBase(ERP5TypeTestCase):
message_list = portal.portal_activities.getMessageList() message_list = portal.portal_activities.getMessageList()
self.assertEquals(len(message_list), 0) self.assertEquals(len(message_list), 0)
def stepMakeImmediateReindexObjectCrashing(self, sequence=None, sequence_list=None, **kw):
"""
Overwrite immediateReindexObject() with a crashing method
"""
def crashingMethod(self):
self.ImmediateReindexObjectIsCalled()
from Products.ERP5Type.Document.Organisation import Organisation
Organisation.immediateReindexObject = crashingMethod
Organisation.recursiveImmediateReindexObject = crashingMethod
def test_01_areActivitiesWellLaunchedByPropertyEdit(self, quiet=quiet, def test_01_areActivitiesWellLaunchedByPropertyEdit(self, quiet=quiet,
run=run_all_test): run=run_all_test):
""" """
...@@ -241,7 +244,6 @@ class TestBase(ERP5TypeTestCase): ...@@ -241,7 +244,6 @@ class TestBase(ERP5TypeTestCase):
CreateObject \ CreateObject \
Tic \ Tic \
CheckTitleValue \ CheckTitleValue \
MakeImmediateReindexObjectCrashing \
SetDifferentTitleValueWithEdit \ SetDifferentTitleValueWithEdit \
CheckIfActivitiesAreCreated \ CheckIfActivitiesAreCreated \
CheckTitleValue \ CheckTitleValue \
...@@ -263,7 +265,6 @@ class TestBase(ERP5TypeTestCase): ...@@ -263,7 +265,6 @@ class TestBase(ERP5TypeTestCase):
CreateObject \ CreateObject \
Tic \ Tic \
CheckTitleValue \ CheckTitleValue \
MakeImmediateReindexObjectCrashing \
SetDifferentTitleValueWithEdit \ SetDifferentTitleValueWithEdit \
CheckIfActivitiesAreCreated \ CheckIfActivitiesAreCreated \
CheckTitleValue \ CheckTitleValue \
...@@ -287,7 +288,6 @@ class TestBase(ERP5TypeTestCase): ...@@ -287,7 +288,6 @@ class TestBase(ERP5TypeTestCase):
CreateObject \ CreateObject \
Tic \ Tic \
CheckTitleValue \ CheckTitleValue \
MakeImmediateReindexObjectCrashing \
SetDifferentTitleValueWithEdit \ SetDifferentTitleValueWithEdit \
CheckIfActivitiesAreCreated \ CheckIfActivitiesAreCreated \
CheckTitleValue \ CheckTitleValue \
...@@ -358,7 +358,6 @@ class TestBase(ERP5TypeTestCase): ...@@ -358,7 +358,6 @@ class TestBase(ERP5TypeTestCase):
CreateObject \ CreateObject \
Tic \ Tic \
CheckGroupValue \ CheckGroupValue \
MakeImmediateReindexObjectCrashing \
SetDifferentGroupValueWithEdit \ SetDifferentGroupValueWithEdit \
CheckIfActivitiesAreCreated \ CheckIfActivitiesAreCreated \
CheckGroupValue \ CheckGroupValue \
...@@ -379,7 +378,6 @@ class TestBase(ERP5TypeTestCase): ...@@ -379,7 +378,6 @@ class TestBase(ERP5TypeTestCase):
CreateObject \ CreateObject \
Tic \ Tic \
CheckGroupValue \ CheckGroupValue \
MakeImmediateReindexObjectCrashing \
SetDifferentGroupValueWithEdit \ SetDifferentGroupValueWithEdit \
CheckIfActivitiesAreCreated \ CheckIfActivitiesAreCreated \
CheckGroupValue \ CheckGroupValue \
...@@ -403,7 +401,6 @@ class TestBase(ERP5TypeTestCase): ...@@ -403,7 +401,6 @@ class TestBase(ERP5TypeTestCase):
CreateObject \ CreateObject \
Tic \ Tic \
CheckGroupValue \ CheckGroupValue \
MakeImmediateReindexObjectCrashing \
SetDifferentGroupValueWithEdit \ SetDifferentGroupValueWithEdit \
CheckIfActivitiesAreCreated \ CheckIfActivitiesAreCreated \
CheckGroupValue \ CheckGroupValue \
...@@ -455,7 +452,6 @@ class TestBase(ERP5TypeTestCase): ...@@ -455,7 +452,6 @@ class TestBase(ERP5TypeTestCase):
CreateObject \ CreateObject \
Tic \ Tic \
CheckTitleValue \ CheckTitleValue \
MakeImmediateReindexObjectCrashing \
SetDifferentTitleValueWithSetter \ SetDifferentTitleValueWithSetter \
CheckIfActivitiesAreCreated \ CheckIfActivitiesAreCreated \
CheckTitleValue \ CheckTitleValue \
...@@ -479,7 +475,6 @@ class TestBase(ERP5TypeTestCase): ...@@ -479,7 +475,6 @@ class TestBase(ERP5TypeTestCase):
CreateObject \ CreateObject \
Tic \ Tic \
CheckTitleValue \ CheckTitleValue \
MakeImmediateReindexObjectCrashing \
SetDifferentTitleValueWithSetter \ SetDifferentTitleValueWithSetter \
CheckIfActivitiesAreCreated \ CheckIfActivitiesAreCreated \
CheckTitleValue \ CheckTitleValue \
...@@ -543,7 +538,6 @@ class TestBase(ERP5TypeTestCase): ...@@ -543,7 +538,6 @@ class TestBase(ERP5TypeTestCase):
CreateObject \ CreateObject \
Tic \ Tic \
CheckGroupValue \ CheckGroupValue \
MakeImmediateReindexObjectCrashing \
SetDifferentGroupValueWithSetter \ SetDifferentGroupValueWithSetter \
CheckIfActivitiesAreCreated \ CheckIfActivitiesAreCreated \
CheckGroupValue \ CheckGroupValue \
...@@ -567,7 +561,6 @@ class TestBase(ERP5TypeTestCase): ...@@ -567,7 +561,6 @@ class TestBase(ERP5TypeTestCase):
CreateObject \ CreateObject \
Tic \ Tic \
CheckGroupValue \ CheckGroupValue \
MakeImmediateReindexObjectCrashing \
SetDifferentGroupValueWithSetter \ SetDifferentGroupValueWithSetter \
CheckIfActivitiesAreCreated \ CheckIfActivitiesAreCreated \
CheckGroupValue \ CheckGroupValue \
......
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