Commit 28d25ef7 authored by Łukasz Nowak's avatar Łukasz Nowak

- there is no need to set system preferences for BPM enabled system


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@28795 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 5fb56a73
......@@ -105,30 +105,6 @@ class TestBPMMixin(ERP5TypeTestCase):
portal_type='Applied Rule')
return applied_rule.newContent(portal_type='Simulation Movement')
@reindex
def setSystemPreference(self):
preference_tool = getToolByName(self.portal, 'portal_preferences')
system_preference_list = preference_tool.contentValues(
portal_type='System Preference')
if len(system_preference_list) > 1:
raise AttributeError('More than one System Preference, cannot test')
if len(system_preference_list) == 0:
system_preference = preference_tool.newContent(
portal_type='System Preference')
else:
system_preference = system_preference_list[0]
system_preference.edit(
preferred_invoicing_resource_use_category_list = \
self.invoicing_resource_use_category_list,
preferred_normal_resource_use_category_list = \
self.normal_resource_use_category_list,
priority = 1,
)
if system_preference.getPreferenceState() == 'disabled':
system_preference.enable()
@reindex
def createAndValidateAccount(self, account_id, account_type):
account_module = self.portal.account_module
......@@ -229,7 +205,6 @@ class TestBPMMixin(ERP5TypeTestCase):
def afterSetUp(self):
self.createCategories()
self.setSystemPreference()
self.createInvoiceTransactionRule()
self.stepTic()
......
......@@ -35,9 +35,6 @@ from DateTime import DateTime
import transaction
class TestPayrollMixin(ERP5ReportTestCase, TestTradeModelLineMixin):
normal_resource_use_category_list = ['payroll/base_salary']
invoicing_resource_use_category_list = ['payroll/tax']
BUSINESS_PATH_CREATION_SEQUENCE_STRING = """
CreateBusinessProcess
CreateBusinessPath
......@@ -68,7 +65,6 @@ class TestPayrollMixin(ERP5ReportTestCase, TestTradeModelLineMixin):
def afterSetUp(self):
"""Prepare the test."""
self.createCategories()
self.setSystemPreference()
@reindex
def beforeTearDown(self):
......@@ -91,30 +87,6 @@ class TestPayrollMixin(ERP5ReportTestCase, TestTradeModelLineMixin):
user = uf.getUserById('admin').__of__(uf)
newSecurityManager(None, user)
@reindex
def setSystemPreference(self):
preference_tool = getToolByName(self.portal, 'portal_preferences')
system_preference_list = preference_tool.contentValues(
portal_type='System Preference')
if len(system_preference_list) > 1:
raise AttributeError('More than one System Preference, cannot test')
if len(system_preference_list) == 0:
system_preference = preference_tool.newContent(
portal_type='System Preference')
else:
system_preference = system_preference_list[0]
system_preference.edit(
preferred_invoicing_resource_use_category_list = \
self.invoicing_resource_use_category_list,
preferred_normal_resource_use_category_list = \
self.normal_resource_use_category_list,
preferred_payroll_resource_use_category_list = \
['use/payroll'],
priority = 1,
)
if system_preference.getPreferenceState() == 'disabled':
system_preference.enable()
@reindex
def createCategories(self):
"""Create the categories for our test. """
......
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