Commit 49b9612b authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

test: set preference owner for accounting tests.

parent 11892e1d
......@@ -31,6 +31,7 @@
import unittest
from AccessControl import getSecurityManager
from DateTime import DateTime
from erp5.component.test.testAccounting import AccountingTestCase
......@@ -5119,6 +5120,13 @@ class TestAccountingReportsWithAnalytic(AccountingTestCase, ERP5ReportTestCase):
def afterSetUp(self):
AccountingTestCase.afterSetUp(self)
self.login()
# change ownership of the preference
self.portal.portal_preferences.accounting_zuite_preference.changeOwnership(
getSecurityManager().getUser(),
True,
)
# create some functions
function = self.portal.portal_categories.function
if function._getOb('a', None) is None:
......
......@@ -28,12 +28,21 @@
##############################################################################
import unittest
from AccessControl import getSecurityManager
from Products.ERP5Type.tests.ERP5TypeFunctionalTestCase import ERP5TypeFunctionalTestCase
class TestRenderJSAccountingReport(ERP5TypeFunctionalTestCase):
foreground = 0
run_only = "renderjs_ui_accounting_report_zuite"
def afterSetUp(self):
# change ownership of the preference
self.portal.portal_preferences.accounting_zuite_preference.changeOwnership(
getSecurityManager().getUser(),
True,
)
super(TestRenderJSAccountingReport, self).afterSetUp()
def getBusinessTemplateList(self):
return (
'erp5_accounting_renderjs_ui_test',
......
......@@ -29,12 +29,23 @@
import unittest
from AccessControl import getSecurityManager
from Products.ERP5Type.tests.ERP5TypeFunctionalTestCase import \
ERP5TypeFunctionalTestCase
class TestZeleniumCore(ERP5TypeFunctionalTestCase):
foreground = 0
def afterSetUp(self):
# change ownership of the preference
pref = self.portal.portal_preferences._getOb(
'accounting_zuite_preference',
None,
)
if pref is not None:
pref.changeOwnership(getSecurityManager().getUser(), True)
super(TestZeleniumCore, self).afterSetUp()
def getBusinessTemplateList(self):
"""
Return the list of business templates.
......
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