[Erp5-report] r41575 nicolas - /erp5/trunk/products/ERP5OOo/tests/testOOoImport.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Tue Dec 21 11:26:51 CET 2010
Author: nicolas
Date: Tue Dec 21 11:26:50 2010
New Revision: 41575
URL: http://svn.erp5.org?rev=41575&view=rev
Log:
Configure System Preference for all users (site scope)
Modified:
erp5/trunk/products/ERP5OOo/tests/testOOoImport.py
Modified: erp5/trunk/products/ERP5OOo/tests/testOOoImport.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5OOo/tests/testOOoImport.py?rev=41575&r1=41574&r2=41575&view=diff
==============================================================================
--- erp5/trunk/products/ERP5OOo/tests/testOOoImport.py [utf8] (original)
+++ erp5/trunk/products/ERP5OOo/tests/testOOoImport.py [utf8] Tue Dec 21 11:26:50 2010
@@ -36,9 +36,11 @@ from Testing import ZopeTestCase
from AccessControl.SecurityManagement import newSecurityManager
from Products.ERP5Type.tests.ERP5TypeTestCase import ERP5TypeTestCase
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.ERP5OOo.OOoUtils import OOoParser
from Products.ERP5.Document.Document import ConversionError
+from Products.ERP5Form.PreferenceTool import Priority
from DateTime import DateTime
import transaction
@@ -63,7 +65,7 @@ def makeFileUpload(name):
path = makeFilePath(name)
return FileUploadTest(path, name)
-class TestOOoImportMixin(object):
+class TestOOoImportMixin(ERP5TypeTestCase):
gender_base_cat_id = 'gender'
function_base_cat_id = 'function'
@@ -72,13 +74,12 @@ class TestOOoImportMixin(object):
Initialize the ERP5 site.
"""
self.login()
-
- # Enable oood on localhost:8008
- # This should probably become a test runner option
self.pref = self.portal.portal_preferences.newContent(
- portal_type='Preference')
- self.pref.setPreferredOoodocServerAddress('localhost')
- self.pref.setPreferredOoodocServerPortNumber(8008)
+ portal_type='System Preference')
+ conversion_dict = _getConversionServerDict()
+ self.pref.setPreferredOoodocServerAddress(conversion_dict['hostname'])
+ self.pref.setPreferredOoodocServerPortNumber(conversion_dict['port'])
+ self.pref.setPriority(Priority.SITE)
self.pref.enable()
# create browser_id_manager
@@ -120,7 +121,7 @@ class TestOOoImportMixin(object):
transaction.commit()
self.tic()
-class TestOOoImport(TestOOoImportMixin, ERP5TypeTestCase):
+class TestOOoImport(TestOOoImportMixin):
"""
ERP5 test import object list from OOo Document
"""
@@ -1035,7 +1036,7 @@ class TestOOoImport(TestOOoImportMixin,
if not_ok:
self.fail('Spreadsheet not read!')
-class TestOOoImportWeb(TestOOoImportMixin, ERP5TypeTestCase):
+class TestOOoImportWeb(TestOOoImportMixin):
def getTitle(self):
"""
Return the title of the current test set.
More information about the Erp5-report
mailing list