Commit 5817a1c1 authored by Łukasz Nowak's avatar Łukasz Nowak

- stepTic is defined in ERP5TypeTestCase and is able to recognise if it is run in sequence or not


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@29839 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 4ec3919a
...@@ -2855,11 +2855,7 @@ class TestAccountingWithSequences(AccountingTestCase): ...@@ -2855,11 +2855,7 @@ class TestAccountingWithSequences(AccountingTestCase):
"""Returns a list of categories that should be created.""" """Returns a list of categories that should be created."""
return ('group/client', 'group/vendor/sub1', 'group/vendor/sub2', return ('group/client', 'group/vendor/sub1', 'group/vendor/sub2',
'payment_mode/check', 'region/%s' % self.default_region, ) 'payment_mode/check', 'region/%s' % self.default_region, )
def stepTic(self, **kw):
"""Flush activity queue. """
self.tic()
def createEntities(self): def createEntities(self):
"""Create entities. """ """Create entities. """
self.client = self.getOrganisationModule().newContent( self.client = self.getOrganisationModule().newContent(
......
...@@ -82,9 +82,6 @@ class TestAmount(ERP5TypeTestCase): ...@@ -82,9 +82,6 @@ class TestAmount(ERP5TypeTestCase):
def afterSetUp(self, quiet=1, run=run_all_test): def afterSetUp(self, quiet=1, run=run_all_test):
self.login() self.login()
def stepTic(self,**kw):
self.tic()
def stepCreateResource(self, sequence=None, sequence_list=None, **kw): def stepCreateResource(self, sequence=None, sequence_list=None, **kw):
""" """
Create a resource Create a resource
......
...@@ -103,9 +103,6 @@ class TestBase(ERP5TypeTestCase, ZopeTestCase.Functional): ...@@ -103,9 +103,6 @@ class TestBase(ERP5TypeTestCase, ZopeTestCase.Functional):
o = self.category_tool.group.newContent(portal_type='Category', o = self.category_tool.group.newContent(portal_type='Category',
id=category_id) id=category_id)
def stepTic(self,**kw):
self.tic()
def stepRemoveWorkflowsRelated(self, sequence=None, sequence_list=None, def stepRemoveWorkflowsRelated(self, sequence=None, sequence_list=None,
**kw): **kw):
""" """
......
...@@ -94,12 +94,6 @@ class TestBug(ERP5TypeTestCase): ...@@ -94,12 +94,6 @@ class TestBug(ERP5TypeTestCase):
################################## ##################################
## Basic steps ## Basic steps
################################## ##################################
def stepTic(self, **kw):
"""
Flush activity queue.
"""
self.tic()
def stepLoginUsualUser(self, **kw): def stepLoginUsualUser(self, **kw):
portal = self.getPortal() portal = self.getPortal()
uf = portal.acl_users uf = portal.acl_users
......
...@@ -145,9 +145,6 @@ class TestBusinessTemplate(ERP5TypeTestCase, LogInterceptor): ...@@ -145,9 +145,6 @@ class TestBusinessTemplate(ERP5TypeTestCase, LogInterceptor):
user = uf.getUserById('seb').__of__(uf) user = uf.getUserById('seb').__of__(uf)
newSecurityManager(None, user) newSecurityManager(None, user)
def stepTic(self,**kw):
self.tic()
def stepUseCoreBusinessTemplate(self, sequence=None, def stepUseCoreBusinessTemplate(self, sequence=None,
sequence_list=None, **kw): sequence_list=None, **kw):
""" """
......
...@@ -78,9 +78,6 @@ class TestCalendar(ERP5ReportTestCase): ...@@ -78,9 +78,6 @@ class TestCalendar(ERP5ReportTestCase):
id='my_group') id='my_group')
def stepTic(self,**kw):
self.tic()
def afterSetUp(self): def afterSetUp(self):
""" """
Fake after setup Fake after setup
......
...@@ -97,9 +97,6 @@ class TestGeographicalAddress(ERP5TypeTestCase): ...@@ -97,9 +97,6 @@ class TestGeographicalAddress(ERP5TypeTestCase):
self.region_category_list = ['region/%s' % x for x \ self.region_category_list = ['region/%s' % x for x \
in region_category_list] in region_category_list]
def stepTic(self,**kw):
self.tic()
def stepCreateEntity(self, sequence=None, sequence_list=None, **kw): def stepCreateEntity(self, sequence=None, sequence_list=None, **kw):
""" """
Create an entity Create an entity
......
...@@ -421,9 +421,6 @@ class TestImmobilisationMixin(ERP5TypeTestCase): ...@@ -421,9 +421,6 @@ class TestImmobilisationMixin(ERP5TypeTestCase):
item_id = 'item%i' % i item_id = 'item%i' % i
item_module.newContent(id=item_id, reference='%i' % i) item_module.newContent(id=item_id, reference='%i' % i)
def stepTic(self, sequence=None, sequence_list=None, **kw):
self.tic()
def stepCreatePackingList(self, sequence=None, sequence_list=None, **kw): def stepCreatePackingList(self, sequence=None, sequence_list=None, **kw):
property_dict = {} property_dict = {}
for property in ('source_section','destination_section','datetime','destination'): for property in ('source_section','destination_section','datetime','destination'):
......
...@@ -78,9 +78,6 @@ class TestInvoiceMixin(TestPackingListMixin, ...@@ -78,9 +78,6 @@ class TestInvoiceMixin(TestPackingListMixin,
def getTitle(self): def getTitle(self):
return "Invoices" return "Invoices"
def stepTic(self, **kw):
self.tic()
def getBusinessTemplateList(self): def getBusinessTemplateList(self):
return ('erp5_base', 'erp5_pdm', 'erp5_trade', 'erp5_accounting', return ('erp5_base', 'erp5_pdm', 'erp5_trade', 'erp5_accounting',
'erp5_invoicing', 'erp5_simplified_invoicing', 'erp5_apparel') 'erp5_invoicing', 'erp5_simplified_invoicing', 'erp5_apparel')
......
...@@ -140,9 +140,6 @@ class TestNotificationTool(ERP5TypeTestCase): ...@@ -140,9 +140,6 @@ class TestNotificationTool(ERP5TypeTestCase):
transaction.commit() transaction.commit()
self.tic() self.tic()
def stepTic(self,**kw):
self.tic()
def stepAddUserA(self, sequence=None, sequence_list=None, **kw): def stepAddUserA(self, sequence=None, sequence_list=None, **kw):
""" """
Create a user Create a user
......
...@@ -137,9 +137,6 @@ class TestOrderMixin: ...@@ -137,9 +137,6 @@ class TestOrderMixin:
portal_type='Category', portal_type='Category',
id=category_id) id=category_id)
def stepTic(self,**kw):
self.tic()
def stepCreateNotVariatedResource(self,sequence=None, sequence_list=None, \ def stepCreateNotVariatedResource(self,sequence=None, sequence_list=None, \
**kw): **kw):
""" """
......
...@@ -67,10 +67,6 @@ class TestPasswordTool(ERP5TypeTestCase): ...@@ -67,10 +67,6 @@ class TestPasswordTool(ERP5TypeTestCase):
transaction.commit() transaction.commit()
self.tic() self.tic()
def stepTic(self,**kw):
transaction.commit()
self.tic()
def getUserFolder(self): def getUserFolder(self):
"""Returns the acl_users. """ """Returns the acl_users. """
return self.getPortal().acl_users return self.getPortal().acl_users
......
...@@ -171,9 +171,6 @@ class TestResource(ERP5TypeTestCase): ...@@ -171,9 +171,6 @@ class TestResource(ERP5TypeTestCase):
id='kilo') id='kilo')
def stepTic(self,**kw):
self.tic()
def stepCreateResource(self, sequence=None, sequence_list=None, **kw): def stepCreateResource(self, sequence=None, sequence_list=None, **kw):
""" """
Create a resource without variation Create a resource without variation
......
...@@ -154,9 +154,6 @@ class TestTaskMixin: ...@@ -154,9 +154,6 @@ class TestTaskMixin:
user = uf.getUserById('alex').__of__(uf) user = uf.getUserById('alex').__of__(uf)
newSecurityManager(None, user) newSecurityManager(None, user)
def stepTic(self, **kw):
self.tic()
def stepCreateResource(self,sequence=None, sequence_list=None, \ def stepCreateResource(self,sequence=None, sequence_list=None, \
**kw): **kw):
""" """
......
...@@ -63,9 +63,6 @@ class TestTrashTool(ERP5TypeTestCase): ...@@ -63,9 +63,6 @@ class TestTrashTool(ERP5TypeTestCase):
user = uf.getUserById('seb').__of__(uf) user = uf.getUserById('seb').__of__(uf)
newSecurityManager(None, user) newSecurityManager(None, user)
def stepTic(self,**kw):
self.tic()
def stepAddBaseCategory(self, sequence=None, sequence_list=None, **kw): def stepAddBaseCategory(self, sequence=None, sequence_list=None, **kw):
""" """
Add a BaseCategory Add a BaseCategory
......
...@@ -300,18 +300,6 @@ class TestERP5BankingMixin: ...@@ -300,18 +300,6 @@ class TestERP5BankingMixin:
""" """
return getattr(self.getPortal(), 'counter_module', None) return getattr(self.getPortal(), 'counter_module', None)
def stepTic(self, **kwd):
"""
The is used to simulate the zope_tic_loop script
Each time this method is called, it simulates a call to tic
which invoke activities in the Activity Tool
"""
# execute transaction
get_transaction().commit()
self.tic()
def createCurrency(self, currency_list=(('EUR', 'Euro', 1/652., 1/650., 'USD'), ('USD', 'USD', 652, 650., 'EUR')), only_currency=False): def createCurrency(self, currency_list=(('EUR', 'Euro', 1/652., 1/650., 'USD'), ('USD', 'USD', 652, 650., 'EUR')), only_currency=False):
# create the currency document for euro inside the currency module # create the currency document for euro inside the currency module
#currency_list = (('EUR', 'Euro', 1/650., 'USD'), ('USD', 'Dollar', 650., 'EUR')) #currency_list = (('EUR', 'Euro', 1/650., 'USD'), ('USD', 'Dollar', 650., 'EUR'))
......
...@@ -71,9 +71,6 @@ class TestGUISecurity(ERP5TypeTestCase): ...@@ -71,9 +71,6 @@ class TestGUISecurity(ERP5TypeTestCase):
user = uf.getUserById(id).__of__(uf) user = uf.getUserById(id).__of__(uf)
newSecurityManager(None, user) newSecurityManager(None, user)
def stepTic(self,**kw):
self.tic()
def stepCreateObjects(self, sequence = None, sequence_list = None, **kw): def stepCreateObjects(self, sequence = None, sequence_list = None, **kw):
# Make sure that the status is clean. # Make sure that the status is clean.
portal = self.getPortal() portal = self.getPortal()
......
...@@ -76,9 +76,6 @@ class TestListBox(ERP5TypeTestCase): ...@@ -76,9 +76,6 @@ class TestListBox(ERP5TypeTestCase):
user = uf.getUserById('seb').__of__(uf) user = uf.getUserById('seb').__of__(uf)
newSecurityManager(None, user) newSecurityManager(None, user)
def stepTic(self,**kw):
self.tic()
def stepCreateObjects(self, sequence = None, sequence_list = None, **kw): def stepCreateObjects(self, sequence = None, sequence_list = None, **kw):
# Make sure that the status is clean. # Make sure that the status is clean.
portal = self.getPortal() portal = self.getPortal()
......
...@@ -66,9 +66,6 @@ class TestPlanningBox(ERP5TypeTestCase): ...@@ -66,9 +66,6 @@ class TestPlanningBox(ERP5TypeTestCase):
user = uf.getUserById('seb').__of__(uf) user = uf.getUserById('seb').__of__(uf)
newSecurityManager(None, user) newSecurityManager(None, user)
def stepTic(self,**kw):
self.tic()
def stepCreateObjects(self, sequence = None, sequence_list = None, **kw): def stepCreateObjects(self, sequence = None, sequence_list = None, **kw):
# Make sure that the status is clean. # Make sure that the status is clean.
portal = self.getPortal() portal = self.getPortal()
......
...@@ -180,11 +180,6 @@ class TestDocument(ERP5TypeTestCase, ZopeTestCase.Functional): ...@@ -180,11 +180,6 @@ class TestDocument(ERP5TypeTestCase, ZopeTestCase.Functional):
def clearCache(self): def clearCache(self):
self.portal.portal_caches.clearAllCache() self.portal.portal_caches.clearAllCache()
## steps
def stepTic(self, sequence=None, sequence_list=None, **kw):
self.tic()
## tests ## tests
def test_01_HasEverything(self, quiet=QUIET, run=RUN_ALL_TEST): def test_01_HasEverything(self, quiet=QUIET, run=RUN_ALL_TEST):
......
...@@ -448,10 +448,6 @@ class TestIngestion(ERP5TypeTestCase): ...@@ -448,10 +448,6 @@ class TestIngestion(ERP5TypeTestCase):
################################## ##################################
## Basic steps ## Basic steps
################################## ##################################
def stepTic(self, sequence=None, sequence_list=None, **kw):
self.tic()
def stepCreatePerson(self, sequence=None, sequence_list=None, **kw): def stepCreatePerson(self, sequence=None, sequence_list=None, **kw):
""" """
Create a person with ID "john" if it does not exists already Create a person with ID "john" if it does not exists already
......
...@@ -178,10 +178,6 @@ class TestOOoImport(ERP5TypeTestCase): ...@@ -178,10 +178,6 @@ class TestOOoImport(ERP5TypeTestCase):
################################## ##################################
## Basic steps ## Basic steps
################################## ##################################
def stepTic(self, sequence=None, sequence_list=None, **kw):
self.tic()
def stepImportRawDataFile(self, sequence=None, sequence_list=None, **kw): def stepImportRawDataFile(self, sequence=None, sequence_list=None, **kw):
f = makeFileUpload('import_data_list.ods') f = makeFileUpload('import_data_list.ods')
person_module = self.getPortal().person_module person_module = self.getPortal().person_module
......
...@@ -71,9 +71,6 @@ class TestConstraint(PropertySheetTestCase): ...@@ -71,9 +71,6 @@ class TestConstraint(PropertySheetTestCase):
transaction.commit() transaction.commit()
self.tic() self.tic()
def stepTic(self,**kw):
self.tic()
def createCategories(self): def createCategories(self):
""" """
Light install create only base categories, so we create Light install create only base categories, so we create
......
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