Commit 8bdc177c authored by Nicolas Delaby's avatar Nicolas Delaby

Configure System Preference for all users (site scope)

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@41575 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 990ce154
...@@ -36,9 +36,11 @@ from Testing import ZopeTestCase ...@@ -36,9 +36,11 @@ from Testing import ZopeTestCase
from AccessControl.SecurityManagement import newSecurityManager from AccessControl.SecurityManagement import newSecurityManager
from Products.ERP5Type.tests.ERP5TypeTestCase import ERP5TypeTestCase from Products.ERP5Type.tests.ERP5TypeTestCase import ERP5TypeTestCase
from Products.ERP5Type.tests.ERP5TypeTestCase import install_product_quiet from Products.ERP5Type.tests.ERP5TypeTestCase import install_product_quiet
from Products.ERP5Type.tests.ERP5TypeTestCase import _getConversionServerDict
from Products.ERP5Type.tests.Sequence import SequenceList from Products.ERP5Type.tests.Sequence import SequenceList
from Products.ERP5OOo.OOoUtils import OOoParser from Products.ERP5OOo.OOoUtils import OOoParser
from Products.ERP5.Document.Document import ConversionError from Products.ERP5.Document.Document import ConversionError
from Products.ERP5Form.PreferenceTool import Priority
from DateTime import DateTime from DateTime import DateTime
import transaction import transaction
...@@ -63,7 +65,7 @@ def makeFileUpload(name): ...@@ -63,7 +65,7 @@ def makeFileUpload(name):
path = makeFilePath(name) path = makeFilePath(name)
return FileUploadTest(path, name) return FileUploadTest(path, name)
class TestOOoImportMixin(object): class TestOOoImportMixin(ERP5TypeTestCase):
gender_base_cat_id = 'gender' gender_base_cat_id = 'gender'
function_base_cat_id = 'function' function_base_cat_id = 'function'
...@@ -72,13 +74,12 @@ class TestOOoImportMixin(object): ...@@ -72,13 +74,12 @@ class TestOOoImportMixin(object):
Initialize the ERP5 site. Initialize the ERP5 site.
""" """
self.login() self.login()
# Enable oood on localhost:8008
# This should probably become a test runner option
self.pref = self.portal.portal_preferences.newContent( self.pref = self.portal.portal_preferences.newContent(
portal_type='Preference') portal_type='System Preference')
self.pref.setPreferredOoodocServerAddress('localhost') conversion_dict = _getConversionServerDict()
self.pref.setPreferredOoodocServerPortNumber(8008) self.pref.setPreferredOoodocServerAddress(conversion_dict['hostname'])
self.pref.setPreferredOoodocServerPortNumber(conversion_dict['port'])
self.pref.setPriority(Priority.SITE)
self.pref.enable() self.pref.enable()
# create browser_id_manager # create browser_id_manager
...@@ -120,7 +121,7 @@ class TestOOoImportMixin(object): ...@@ -120,7 +121,7 @@ class TestOOoImportMixin(object):
transaction.commit() transaction.commit()
self.tic() self.tic()
class TestOOoImport(TestOOoImportMixin, ERP5TypeTestCase): class TestOOoImport(TestOOoImportMixin):
""" """
ERP5 test import object list from OOo Document ERP5 test import object list from OOo Document
""" """
...@@ -1035,7 +1036,7 @@ class TestOOoImport(TestOOoImportMixin, ERP5TypeTestCase): ...@@ -1035,7 +1036,7 @@ class TestOOoImport(TestOOoImportMixin, ERP5TypeTestCase):
if not_ok: if not_ok:
self.fail('Spreadsheet not read!') self.fail('Spreadsheet not read!')
class TestOOoImportWeb(TestOOoImportMixin, ERP5TypeTestCase): class TestOOoImportWeb(TestOOoImportMixin):
def getTitle(self): def getTitle(self):
""" """
Return the title of the current test set. Return the title of the current test set.
......
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